2021-09-24 11:59:12 +08:00
|
|
|
add_subdirectory(TorchToLinalg)
|
|
|
|
add_subdirectory(TorchToSCF)
|
2022-08-11 03:12:51 +08:00
|
|
|
add_subdirectory(TorchToArith)
|
2021-10-08 10:07:03 +08:00
|
|
|
add_subdirectory(TorchToTosa)
|
2023-02-02 21:29:47 +08:00
|
|
|
if(TORCH_MLIR_ENABLE_STABLEHLO)
|
|
|
|
add_subdirectory(TorchToStablehlo)
|
2022-07-21 07:18:16 +08:00
|
|
|
endif()
|
2022-03-03 00:48:15 +08:00
|
|
|
add_subdirectory(TorchToTMTensor)
|
2022-11-24 12:33:47 +08:00
|
|
|
add_subdirectory(TorchConversionToMLProgram)
|
2022-03-03 00:42:25 +08:00
|
|
|
add_subdirectory(Utils)
|
2021-09-24 11:59:12 +08:00
|
|
|
|
|
|
|
# TODO: Automate this with add_torch_mlir_conversion_library.
|
2022-07-21 07:18:16 +08:00
|
|
|
set(linked_libs TorchMLIRTorchToLinalg
|
|
|
|
TorchMLIRTorchToSCF
|
2022-08-11 03:12:51 +08:00
|
|
|
TorchMLIRTorchToArith
|
2022-07-21 07:18:16 +08:00
|
|
|
TorchMLIRTorchToTosa
|
|
|
|
TorchMLIRTorchToTMTensor
|
2022-11-24 12:33:47 +08:00
|
|
|
TorchMLIRTorchConversionToMLProgram
|
2022-07-21 07:18:16 +08:00
|
|
|
TorchMLIRConversionUtils)
|
2023-02-02 21:29:47 +08:00
|
|
|
if(TORCH_MLIR_ENABLE_STABLEHLO)
|
|
|
|
list(APPEND linked_libs TorchMLIRTorchToStablehlo)
|
2022-07-21 07:18:16 +08:00
|
|
|
endif()
|
2021-09-24 11:59:12 +08:00
|
|
|
|
|
|
|
add_mlir_library(TorchMLIRConversionPasses
|
|
|
|
Passes.cpp
|
|
|
|
|
|
|
|
DEPENDS
|
|
|
|
TorchMLIRConversionPassIncGen
|
|
|
|
|
|
|
|
LINK_LIBS PUBLIC
|
2022-07-21 07:18:16 +08:00
|
|
|
${linked_libs}
|
2021-09-24 11:59:12 +08:00
|
|
|
)
|