[Bazel] Add conversion targets for `TorchToTensor` (#2666)

Adapts bazel build per https://github.com/llvm/torch-mlir/pull/2648. 


https://github.com/sjain-stanford/torch-mlir/actions/runs/7233207462/job/19708228888
pull/2672/head snapshot-20231218.1056
Sambhav Jain 2023-12-17 06:07:43 -08:00 committed by GitHub
parent ae1a6e4a5a
commit 9c655d0bfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 0 deletions

View File

@ -420,6 +420,29 @@ cc_library(
], ],
) )
cc_library(
name = "TorchMLIRTorchToTensor",
srcs = glob([
"lib/Conversion/*.h",
"lib/Conversion/TorchToTensor/*.cpp",
]),
hdrs = glob([
"include/torch-mlir/Conversion/TorchToTensor/*.h",
]),
strip_include_prefix = "include",
deps = [
":TorchMLIRConversionPassesIncGen",
":TorchMLIRConversionUtils",
":TorchMLIRTorchBackendTypeConversion",
":TorchMLIRTorchConversionDialect",
":TorchMLIRTorchDialect",
"@llvm-project//mlir:Dialect",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:TensorDialect",
],
)
cc_library( cc_library(
name = "TorchMLIRTorchConversionToMLProgram", name = "TorchMLIRTorchConversionToMLProgram",
srcs = glob([ srcs = glob([
@ -515,6 +538,7 @@ cc_library(
":TorchMLIRTorchToSCF", ":TorchMLIRTorchToSCF",
":TorchMLIRTorchToStablehlo", ":TorchMLIRTorchToStablehlo",
":TorchMLIRTorchToTMTensor", ":TorchMLIRTorchToTMTensor",
":TorchMLIRTorchToTensor",
":TorchMLIRTorchToTosa", ":TorchMLIRTorchToTosa",
], ],
) )