From 9c655d0bfb166785dc17e51b0afa1f937c227cef Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Sun, 17 Dec 2023 06:07:43 -0800 Subject: [PATCH] [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 --- utils/bazel/torch-mlir-overlay/BUILD.bazel | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/utils/bazel/torch-mlir-overlay/BUILD.bazel b/utils/bazel/torch-mlir-overlay/BUILD.bazel index 2a9edaac5..138dcbefb 100644 --- a/utils/bazel/torch-mlir-overlay/BUILD.bazel +++ b/utils/bazel/torch-mlir-overlay/BUILD.bazel @@ -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( name = "TorchMLIRTorchConversionToMLProgram", srcs = glob([ @@ -515,6 +538,7 @@ cc_library( ":TorchMLIRTorchToSCF", ":TorchMLIRTorchToStablehlo", ":TorchMLIRTorchToTMTensor", + ":TorchMLIRTorchToTensor", ":TorchMLIRTorchToTosa", ], )