torch-mlir
torch-mlir copied to clipboard
LTC MacOS-arm64 linkage failure
After https://github.com/llvm/torch-mlir/pull/1205, we discovered that LTC has trouble linking on macOS-arm64.
Detailed logs here: https://github.com/llvm/torch-mlir/runs/7907158318?check_suite_focus=true
As such, we have disabled LTC build on macOS temporarily.
Undefined symbols for architecture arm64:
"_FLAGS_torch_lazy_reuse_ir", referenced from:
torch::lazy::LazyNativeFunctions::_embedding_bag(at::Tensor const&, at::Tensor const&, at::Tensor const&, bool, long long, bool, c10::optional<at::Tensor> const&, bool, long long) in LazyNativeFunctions.cpp.o
torch::lazy::LazyNativeFunctions::_log_softmax(at::Tensor const&, long long, bool) in LazyNativeFunctions.cpp.o
torch::lazy::LazyNativeFunctions::_log_softmax_backward_data(at::Tensor const&, at::Tensor const&, long long, c10::ScalarType) in LazyNativeFunctions.cpp.o
torch::lazy::LazyNativeFunctions::_reshape_alias_copy(at::Tensor const&, c10::ArrayRef<long long>, c10::ArrayRef<long long>) in LazyNativeFunctions.cpp.o
torch::lazy::LazyNativeFunctions::_softmax(at::Tensor const&, long long, bool) in LazyNativeFunctions.cpp.o
torch::lazy::LazyNativeFunctions::_softmax_backward_data(at::Tensor const&, at::Tensor const&, long long, c10::ScalarType) in LazyNativeFunctions.cpp.o
torch::lazy::LazyNativeFunctions::abs(at::Tensor const&) in LazyNativeFunctions.cpp.o
...
...
where are the functions like torch::lazy::LazyTensor:: ? Maybe that library isn't getting included ? Or the CMake flags for Lazytensor are eating up the -DCMAKE_OSX_ARCHITECTURES flag and not building for arm64.
where are the functions like torch::lazy::LazyTensor:: ? Maybe that library isn't getting included ?
Here's where functions for LazyTensor
are defined: https://github.com/pytorch/pytorch/blob/master/torch/csrc/lazy/core/tensor.cpp#L195-L208
It works in non macos-arm64 build, so I'm not sure why it wouldn't be included specifically in this case...
Or the CMake flags for Lazytensor are eating up the -DCMAKE_OSX_ARCHITECTURES flag and not building for arm64.
How would I check for this?