Skip to content

[Break XPU] xpu: build fails for XPU backend due to outdated aoti_torch/generated/c_shim_xpu.h #141268

@dvrogozh

Description

@dvrogozh

Building at the a847790 with XPU backend support fails due to outdated torch/csrc/inductor/aoti_torch/generated/c_shim_xpu.h. See below log.

Issue was introduced by the following 2 commits both updating torchgen/aoti/fallback_ops.py:

Pending update of torch-xpu-ops commit pin (#141201) did notice this issue.

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/dvrogozh/git/pytorch/pytorch/torchgen/gen.py", line 3042, in <module>
    main()
  File "/home/dvrogozh/git/pytorch/pytorch/torchgen/gen.py", line 2979, in main
    gen_source_files(
  File "/home/dvrogozh/git/pytorch/pytorch/torchgen/gen.py", line 2403, in gen_source_files
    assert old_header == new_header, """
AssertionError:

WARNING: The generated AOTInductor C shim header files have unexpectedly changed. This
indicates an AOTInductor fallback operator ABI backward compatibility breakage!!!
Only in a limited number of situations, this is allowed:

1. You added a fallback op to the inductor_fallback_ops list in torchgen/aoti/fallback_ops.py.
If that's the case, run `python torchgen/gen.py --update-aoti-c-shim` to update the existing
C shim header files.

2. You added a new default argument to an existing fallback op. This is clearly a BC breaking
change in the AOTInductor land. In this case, you need to keep a manual copy of that existing
fallback op in a file, e.g. torch/csrc/inductor/aoti_torch/c/shim.h, bump up the version
number of that fallback op in the newly generated C shim files, and update the cpp wrapper
codegen to generate the correct cpp call for this op. Contact AOTInductor team for assistance.


CMake Error at cmake/Codegen.cmake:218 (message):
  Failed to get generated_sources list
Call Stack (most recent call first):
  caffe2/CMakeLists.txt:2 (include)

CC: @gujinghui @EikanWang @fengyuan14 @guangyey @jgong5 @xytintel

cc @malfet @seemethere @gujinghui @EikanWang @fengyuan14 @guangyey

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: buildBuild system issuesmodule: xpuIntel XPU related issuestriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions