You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MLIR/LLVM supports building with CMake setting -DBUILD_SHARED_LIBS=ON. This can be helpful during development for various reasons. However, building with this setting is much less forgiving of missing link dependencies in the library declarations or of circular dependencies.
In the library TorchMLIRTorchUtils, for example, there are no link dependencies listed. The organization of the libraries TorchMLIRTorchUtils and TorchMLIRTorchDialect is also circular. Each depends on the other, which makes the build a bit brittle for downstream users. This is clear from looking at the Bazel build as well: all the headers in include/torch-mlir/Dialect/Torch/IR are referenced as includes by both libraries. I propose to move the functions that TorchMLIRTorchDialect actually depends on into the TorchMLIRTorchDialect directly, removing the circular dependency (and also fixing any other issues which block use of -DBUILD_SHARED_LIBS=ON).
The text was updated successfully, but these errors were encountered:
MLIR/LLVM supports building with CMake setting
-DBUILD_SHARED_LIBS=ON
. This can be helpful during development for various reasons. However, building with this setting is much less forgiving of missing link dependencies in the library declarations or of circular dependencies.In the library
TorchMLIRTorchUtils
, for example, there are no link dependencies listed. The organization of the librariesTorchMLIRTorchUtils
andTorchMLIRTorchDialect
is also circular. Each depends on the other, which makes the build a bit brittle for downstream users. This is clear from looking at the Bazel build as well: all the headers ininclude/torch-mlir/Dialect/Torch/IR
are referenced as includes by both libraries. I propose to move the functions thatTorchMLIRTorchDialect
actually depends on into theTorchMLIRTorchDialect
directly, removing the circular dependency (and also fixing any other issues which block use of-DBUILD_SHARED_LIBS=ON
).The text was updated successfully, but these errors were encountered: