Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LTC build error after PT bump: multiple definition of torch::lazy::compute_shape_arange #3120

Closed
sjain-stanford opened this issue Apr 9, 2024 · 1 comment · Fixed by #3126
Assignees

Comments

@sjain-stanford
Copy link
Member

Just noticed that the nightly releases of torch-mlir have been broken for 5 days (https://github.com/llvm/torch-mlir-release/actions/runs/8537617646/job/23388584293) starting April 2nd. Seems correlated in timing to the PyTorch bump PR: #3094, and I see this being disabled from CI as well.

Linker error: multiple definition of torch::lazy::compute_shape_arange

.
.
  [3874/3917] Linking CXX shared library tools/torch-mlir/python_packages/torch_mlir/torch_mlir/_mlir_libs/lib_torch_mlir_ltc.so
  FAILED: tools/torch-mlir/python_packages/torch_mlir/torch_mlir/_mlir_libs/lib_torch_mlir_ltc.so
  : && /opt/rh/devtoolset-10/root/usr/bin/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time .
.
.
  shape_inference.cpp:(.text._ZN5torch4lazy20compute_shape_arangeERKN3c106ScalarES4_S4_St8optionalINS1_10ScalarTypeEES5_INS1_6LayoutEES5_INS1_6DeviceEES5_IbE+0x0): multiple definition of `torch::lazy::compute_shape_arange(c10::Scalar const&, c10::Scalar const&, c10::Scalar const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>)'; tools/torch-mlir/projects/ltc/csrc/base_lazy_backend/CMakeFiles/torch_mlir_ltc_backend.dir/generated/shape_inference.cpp.o:shape_inference.cpp:(.text._ZN5torch4lazy20compute_shape_arangeERKN3c106ScalarES4_S4_St8optionalINS1_10ScalarTypeEES5_INS1_6LayoutEES5_INS1_6DeviceEES5_IbE+0x0): first defined here
  collect2: error: ld returned 1 exit status
@stellaraccident
Copy link
Collaborator

I think we've already disabled that in the regular CI. Might need to be disabled for releases.

@sjain-stanford sjain-stanford linked a pull request Apr 9, 2024 that will close this issue
antoniojkim added a commit that referenced this issue Apr 9, 2024
They replaced all `c10::optional` usages with `std::optional` in
torchgen'd code in
pytorch/pytorch@fb90b4d
causing the LTC build to break.

Replacing all usages of `c10::optional` with `std::optional` in
`projects/ltc` has fixed the issue

Issue: #3120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants