[llvm] [mlir][bzl] Add CAPI targets for Shape and Tensor. (PR #163579)
Jacques Pienaar via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 15 08:54:53 PDT 2025
https://github.com/jpienaar updated https://github.com/llvm/llvm-project/pull/163579
>From da3ed5bd36966ffe9a3008fbcf0e8c9ea95a21d6 Mon Sep 17 00:00:00 2001
From: Jacques Pienaar <jacques+gh at japienaar.info>
Date: Wed, 15 Oct 2025 15:54:02 +0000
Subject: [PATCH] [mlir][bzl] Add CAPI targets for Shape and Tensor.
---
.../llvm-project-overlay/mlir/BUILD.bazel | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 6c7679b5ea972..14babc34c158a 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -711,6 +711,19 @@ mlir_c_api_cc_library(
],
)
+mlir_c_api_cc_library(
+ name = "CAPIShape",
+ srcs = ["lib/CAPI/Dialect/Shape.cpp"],
+ hdrs = ["include/mlir-c/Dialect/Shape.h"],
+ capi_deps = [
+ ":CAPIIR",
+ ],
+ includes = ["include"],
+ deps = [
+ ":ShapeDialect",
+ ],
+)
+
mlir_c_api_cc_library(
name = "CAPITarget",
srcs = ["lib/CAPI/Target/LLVMIR.cpp"],
@@ -732,6 +745,19 @@ mlir_c_api_cc_library(
],
)
+mlir_c_api_cc_library(
+ name = "CAPITensor",
+ srcs = ["lib/CAPI/Dialect/Tensor.cpp"],
+ hdrs = ["include/mlir-c/Dialect/Tensor.h"],
+ capi_deps = [
+ ":CAPIIR",
+ ],
+ includes = ["include"],
+ deps = [
+ ":TensorDialect",
+ ],
+)
+
mlir_c_api_cc_library(
name = "CAPIGPU",
srcs = [
More information about the llvm-commits
mailing list