[llvm] [bazel] Fix mlir build broken by 681ae097. (PR #105552)
Chenguang Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 09:52:07 PDT 2024
https://github.com/wecing created https://github.com/llvm/llvm-project/pull/105552
The cmake config creates two targets, `MLIRTensorMeshShardingExtensions` and `MLIRTensorAllExtensions`; but for bazel, with the `Func` dialect we only have a single `FuncExtensions`. Here I am following the `Func` dialect convension to only create a single `TensorExtensions`.
>From db48fb8ccf1792cf801cd73a3ac6d78d2e9bb292 Mon Sep 17 00:00:00 2001
From: Chenguang Wang <w3cing at gmail.com>
Date: Wed, 21 Aug 2024 09:50:11 -0700
Subject: [PATCH] [bazel] Fix mlir build broken by 681ae097.
The cmake config creates two targets, MLIRTensorMeshShardingExtensions
and MLIRTensorAllExtensions; but for bazel, with the Func dialect we
only have a single FuncExtensions. Here I am following the Func dialect
convension to only create a single TensorExtensions.
---
.../llvm-project-overlay/mlir/BUILD.bazel | 39 +++++++++----------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 57b08448ae9294..ddb08f12f04976 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -3337,25 +3337,6 @@ cc_library(
],
)
-cc_library(
- name = "TensorShardingInterfaceImpl",
- srcs = ["lib/Dialect/Mesh/Interfaces/TensorShardingInterfaceImpl.cpp"],
- hdrs = [
- "include/mlir/Dialect/Mesh/IR/TensorShardingInterfaceImpl.h",
- ],
- includes = ["include"],
- deps = [
- ":DialectUtils",
- ":IR",
- ":MeshDialect",
- ":MeshShardingInterface",
- ":MeshShardingInterfaceIncGen",
- ":Support",
- ":TensorDialect",
- "//llvm:Support",
- ],
-)
-
cc_library(
name = "MeshDialect",
srcs = ["lib/Dialect/Mesh/IR/MeshOps.cpp"],
@@ -4890,6 +4871,7 @@ cc_library(
":ROCDLToLLVMIRTranslation",
":SCFTransformOps",
":SparseTensorTransformOps",
+ ":TensorExtensions",
":TensorTransformOps",
":TransformDebugExtension",
":TransformIRDLExtension",
@@ -7600,6 +7582,7 @@ cc_library(
"lib/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.cpp",
],
hdrs = [
+ "include/mlir/Dialect/Tensor/IR/ShardingInterfaceImpl.h",
"include/mlir/Dialect/Tensor/IR/Tensor.h",
"include/mlir/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.h",
],
@@ -7669,6 +7652,23 @@ cc_library(
],
)
+cc_library(
+ name = "TensorExtensions",
+ srcs = glob(["lib/Dialect/Tensor/Extensions/*.cpp"]),
+ hdrs = glob(["include/mlir/Dialect/Tensor/Extensions/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":DialectUtils",
+ ":IR",
+ ":MeshDialect",
+ ":MeshShardingInterface",
+ ":MeshShardingInterfaceIncGen",
+ ":Support",
+ ":TensorDialect",
+ "//llvm:Support",
+ ],
+)
+
cc_library(
name = "TensorUtils",
srcs = ["lib/Dialect/Tensor/Utils/Utils.cpp"],
@@ -9603,7 +9603,6 @@ cc_library(
":SparseTensorTransforms",
":TensorDialect",
":TensorInferTypeOpInterfaceImpl",
- ":TensorShardingInterfaceImpl",
":TensorTilingInterfaceImpl",
":TensorTransformOps",
":TensorTransforms",
More information about the llvm-commits
mailing list