[llvm] Fix bazel build (PR #104054)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 09:56:53 PDT 2024
https://github.com/quanwanandy created https://github.com/llvm/llvm-project/pull/104054
Tested w/ bazel locally.
>From 50caea0599504cdbf9ee3431871282c98413414a Mon Sep 17 00:00:00 2001
From: Andy Wan <quanwanandy at google.com>
Date: Mon, 12 Aug 2024 12:17:52 -0700
Subject: [PATCH 1/2] fix bazel build
---
.../llvm-project-overlay/mlir/BUILD.bazel | 88 +++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 4e0082aebf90c1..f2277d99b4ecb2 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -3268,6 +3268,20 @@ gentbl_cc_library(
],
"include/mlir/Dialect/Mesh/IR/MeshAttributes.cpp.inc",
),
+ (
+ [
+ "-gen-typedef-decls",
+ "-typedefs-dialect=mesh",
+ ],
+ "include/mlir/Dialect/Mesh/IR/MeshTypes.h.inc",
+ ),
+ (
+ [
+ "-gen-typedef-defs",
+ "-typedefs-dialect=mesh",
+ ],
+ "include/mlir/Dialect/Mesh/IR/MeshTypes.cpp.inc",
+ ),
],
tblgen = ":mlir-tblgen",
td_file = "include/mlir/Dialect/Mesh/IR/MeshOps.td",
@@ -3308,6 +3322,26 @@ cc_library(
":MeshDialect",
":MeshShardingInterfaceIncGen",
":Support",
+ ":TensorDialect",
+ "//llvm:Support",
+ ],
+)
+
+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",
+ ":MeshShardingInterfaceIncGen",
+ ":MeshShardingInterface",
+ ":Support",
+ ":TensorDialect",
"//llvm:Support",
],
)
@@ -4826,6 +4860,7 @@ cc_library(
":BuiltinToLLVMIRTranslation",
":ComplexToLLVM",
":ControlFlowToLLVM",
+ ":DLTITransformOps",
":FuncExtensions",
":FuncToLLVM",
":FuncTransformOps",
@@ -8217,6 +8252,7 @@ cc_library(
":ControlFlowDialect",
":ConversionPassIncGen",
":IR",
+ ":LLVMDialect",
":SCFDialect",
":SCFTransforms",
":TransformUtils",
@@ -9524,6 +9560,7 @@ cc_library(
":SparseTensorTransforms",
":TensorDialect",
":TensorInferTypeOpInterfaceImpl",
+ ":TensorShardingInterfaceImpl",
":TensorTilingInterfaceImpl",
":TensorTransformOps",
":TensorTransforms",
@@ -11767,6 +11804,7 @@ cc_library(
":ArithDialect",
":ConversionPassIncGen",
":IR",
+ ":LLVMDialect",
":MemRefDialect",
":Pass",
":SCFDialect",
@@ -11775,6 +11813,7 @@ cc_library(
":Transforms",
":VectorDialect",
":VectorTransforms",
+ ":VectorUtils",
],
)
@@ -13988,6 +14027,55 @@ cc_library(
],
)
+td_library(
+ name = "DLTITransformTdFiles",
+ srcs = [
+ "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td",
+ ],
+ includes = ["include"],
+ deps = [":TransformDialectTdFiles"],
+)
+
+gentbl_cc_library(
+ name = "DLTITransformOpsIncGen",
+ tbl_outs = [
+ (
+ [
+ "-gen-op-decls",
+ "-dialect=dlti",
+ ],
+ "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.h.inc",
+ ),
+ (
+ [
+ "-gen-op-defs",
+ "-dialect=dlti",
+ ],
+ "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.cpp.inc",
+ ),
+ ],
+ tblgen = ":mlir-tblgen",
+ td_file = "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td",
+ deps = [
+ ":DLTITransformTdFiles",
+ ],
+)
+
+cc_library(
+ name = "DLTITransformOps",
+ srcs = glob(["lib/Dialect/DLTI/TransformOps/*.cpp"]),
+ hdrs = glob(["include/mlir/Dialect/DLTI/TransformOps/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":DataLayoutInterfaces",
+ ":DLTIDialect",
+ ":DLTITransformOpsIncGen",
+ ":TransformDialect",
+ ":TransformDialectInterfaces",
+ ":TransformDialectUtils",
+ ],
+)
+
gentbl_cc_library(
name = "ReducerIncGen",
tbl_outs = [
>From aa0ca4ac71a38a1e36c9a4460490e77ddc9c3f73 Mon Sep 17 00:00:00 2001
From: Andy Wan <quanwanandy at google.com>
Date: Wed, 14 Aug 2024 09:53:58 -0700
Subject: [PATCH 2/2] Fix bazel build.
---
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 24083874c66bc5..ac9e311ad5110e 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -342,6 +342,7 @@ cc_library(
"include/mlir/IR/PDLPatternMatch.h.inc",
"include/mlir/Interfaces/CallInterfaces.h",
"include/mlir/Interfaces/DataLayoutInterfaces.h",
+ "include/mlir/Interfaces/InferIntRangeInterface.h",
"include/mlir/Interfaces/SideEffectInterfaces.h",
],
hdrs = glob([
@@ -362,6 +363,7 @@ cc_library(
":BytecodeOpInterfaceIncGen",
":CallOpInterfacesIncGen",
":DataLayoutInterfacesIncGen",
+ ":InferIntRangeInterfaceIncGen",
":OpAsmInterfaceIncGen",
":RegionKindInterfaceIncGen",
":SideEffectInterfacesIncGen",
@@ -5422,7 +5424,9 @@ cc_library(
hdrs = glob(["include/mlir/Dialect/LLVMIR/Transforms/*.h"]),
includes = ["include"],
deps = [
+ ":DataLayoutInterfaces",
":FuncDialect",
+ ":InliningUtils",
":IR",
":LLVMDialect",
":LLVMPassIncGen",
More information about the llvm-commits
mailing list