Fix a few missing dependencies. (#2014)

`TorchToTMTensor` depends on `TorchMLIRTorchUtils` for
`mlir::torch::torch_upstream::get_reduction_enum`.

`TorchMLIRTorchConversionPasses` depends on multiple libs for both tblgen'd
headers and definitions. Test with `ninja TorchMLIRTorchConversionPasses` from
a clean build.
pull/2013/head snapshot-20230412.806
Alexandre Rames 2023-04-11 11:18:49 -07:00 committed by GitHub
parent 72c3326097
commit 224ee27610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 14 deletions

View File

@ -12,9 +12,10 @@ add_mlir_conversion_library(TorchMLIRTorchConversionToMLProgram
LINK_LIBS PUBLIC
MLIRIR
MLIRPass
MLIRLinalgDialect
MLIRMLProgramDialect
MLIRMathDialect
MLIRPass
TorchMLIRTorchDialect
)

View File

@ -17,6 +17,7 @@ TorchToTMTensor.cpp
MLIRMathDialect
TorchMLIRTorchDialect
TorchMLIRTMTensorDialect
TorchMLIRTorchUtils
)
torch_mlir_target_includes(TorchMLIRTorchToTMTensor)

View File

@ -16,6 +16,7 @@ add_mlir_conversion_library(TorchMLIRTorchToTosa
MLIRIR
MLIRPass
MLIRTosaDialect
TorchMLIRConversionUtils
TorchMLIRTorchDialect
)

View File

@ -1,16 +1,22 @@
set(LinkedLibs MLIRIR
MLIRPass
MLIRFuncTransforms
TorchMLIRTorchConversionDialect
TorchMLIRTorchDialect
TorchMLIRTorchPasses
TorchMLIRTorchToLinalg
TorchMLIRTorchToTMTensor
TorchMLIRTorchToArith
TorchMLIRTorchToSCF
TorchMLIRTorchConversionToMLProgram
MLIRMemRefTransforms)
set(LinkedLibs
MLIRFuncTransforms
MLIRIR
MLIRLinalgTransforms
MLIRMemRefTransforms
MLIRPass
MLIRTosaTransforms
MLIRVectorTransforms
TorchMLIRTorchConversionDialect
TorchMLIRTorchConversionToMLProgram
TorchMLIRTorchDialect
TorchMLIRTorchPasses
TorchMLIRTorchToArith
TorchMLIRTorchToLinalg
TorchMLIRTorchToSCF
TorchMLIRTorchToTMTensor
TorchMLIRTorchToTosa
)
if(TORCH_MLIR_ENABLE_STABLEHLO)
list(APPEND LinkedLibs ChloPasses)
endif()