[Mlir-commits] [llvm] [mlir] [mlir][sparse] refactor utilities into transform/utils dir (PR #75250)
Aart Bik
llvmlistbot at llvm.org
Tue Dec 12 14:47:43 PST 2023
https://github.com/aartbik updated https://github.com/llvm/llvm-project/pull/75250
>From d0924eed037867897c5b263a17e55ff8b7a951a9 Mon Sep 17 00:00:00 2001
From: Aart Bik <ajcbik at google.com>
Date: Tue, 12 Dec 2023 14:38:08 -0800
Subject: [PATCH 1/3] [mlir][sparse] refactor utilities into transform/utils
dir
Separates actual transformation files from supporting
utility files in the transforms directory. Includes a
bazel overlay fix for the build (as well as a bit of
cleanup of that file to be less verbose and more flexible).
---
.../Dialect/SparseTensor/Transforms/CMakeLists.txt | 12 +++++++-----
.../Transforms/SparseBufferRewriting.cpp | 2 +-
.../SparseTensor/Transforms/SparseGPUCodegen.cpp | 4 ++--
.../SparseTensor/Transforms/SparseReinterpretMap.cpp | 4 ++--
.../Transforms/SparseStorageSpecifierToLLVM.cpp | 2 +-
.../SparseTensor/Transforms/SparseTensorCodegen.cpp | 4 ++--
.../Transforms/SparseTensorConversion.cpp | 2 +-
.../Transforms/SparseTensorRewriting.cpp | 4 ++--
.../SparseTensor/Transforms/SparseVectorization.cpp | 4 ++--
.../SparseTensor/Transforms/Sparsification.cpp | 6 +++---
.../Transforms/{ => Utils}/CodegenEnv.cpp | 0
.../SparseTensor/Transforms/{ => Utils}/CodegenEnv.h | 0
.../Transforms/{ => Utils}/CodegenUtils.cpp | 0
.../Transforms/{ => Utils}/CodegenUtils.h | 0
.../Transforms/{ => Utils}/IterationGraphSorter.cpp | 0
.../Transforms/{ => Utils}/IterationGraphSorter.h | 0
.../Transforms/{ => Utils}/LoopEmitter.cpp | 0
.../Transforms/{ => Utils}/LoopEmitter.h | 0
.../{ => Utils}/SparseTensorDescriptor.cpp | 0
.../Transforms/{ => Utils}/SparseTensorDescriptor.h | 0
20 files changed, 23 insertions(+), 21 deletions(-)
rename mlir/lib/Dialect/SparseTensor/Transforms/{ => Utils}/CodegenEnv.cpp (100%)
rename mlir/lib/Dialect/SparseTensor/Transforms/{ => Utils}/CodegenEnv.h (100%)
rename mlir/lib/Dialect/SparseTensor/Transforms/{ => Utils}/CodegenUtils.cpp (100%)
rename mlir/lib/Dialect/SparseTensor/Transforms/{ => Utils}/CodegenUtils.h (100%)
rename mlir/lib/Dialect/SparseTensor/Transforms/{ => Utils}/IterationGraphSorter.cpp (100%)
rename mlir/lib/Dialect/SparseTensor/Transforms/{ => Utils}/IterationGraphSorter.h (100%)
rename mlir/lib/Dialect/SparseTensor/Transforms/{ => Utils}/LoopEmitter.cpp (100%)
rename mlir/lib/Dialect/SparseTensor/Transforms/{ => Utils}/LoopEmitter.h (100%)
rename mlir/lib/Dialect/SparseTensor/Transforms/{ => Utils}/SparseTensorDescriptor.cpp (100%)
rename mlir/lib/Dialect/SparseTensor/Transforms/{ => Utils}/SparseTensorDescriptor.h (100%)
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt b/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
index 8459e46e5814f0..ad8b0d02eca35e 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
@@ -1,9 +1,6 @@
add_mlir_dialect_library(MLIRSparseTensorTransforms
+ # Rewriting.
BufferizableOpInterfaceImpl.cpp
- CodegenEnv.cpp
- CodegenUtils.cpp
- IterationGraphSorter.cpp
- LoopEmitter.cpp
SparseBufferRewriting.cpp
SparseGPUCodegen.cpp
SparseReinterpretMap.cpp
@@ -12,11 +9,16 @@ add_mlir_dialect_library(MLIRSparseTensorTransforms
SparseTensorConversion.cpp
SparseTensorPasses.cpp
SparseTensorRewriting.cpp
- SparseTensorDescriptor.cpp
SparseVectorization.cpp
Sparsification.cpp
SparsificationAndBufferizationPass.cpp
StageSparseOperations.cpp
+ # Utilities.
+ Utils/CodegenEnv.cpp
+ Utils/CodegenUtils.cpp
+ Utils/IterationGraphSorter.cpp
+ Utils/LoopEmitter.cpp
+ Utils/SparseTensorDescriptor.cpp
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SparseTensor
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp
index cdbf4f048a00f3..248e9413b6e0dc 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "CodegenUtils.h"
+#include "Utils/CodegenUtils.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
index 5155cab772d440..477ff2e1c9237e 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
@@ -13,8 +13,8 @@
//
//===----------------------------------------------------------------------===//
-#include "CodegenUtils.h"
-#include "LoopEmitter.h"
+#include "Utils/CodegenUtils.h"
+#include "Utils/LoopEmitter.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseReinterpretMap.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseReinterpretMap.cpp
index 488079cfe4e32d..f2e1b0bc58f132 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseReinterpretMap.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseReinterpretMap.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#include "CodegenUtils.h"
-#include "IterationGraphSorter.h"
+#include "Utils/CodegenUtils.h"
+#include "Utils/IterationGraphSorter.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseStorageSpecifierToLLVM.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseStorageSpecifierToLLVM.cpp
index a6f4dd3c2f7185..91dad050b28852 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseStorageSpecifierToLLVM.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseStorageSpecifierToLLVM.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "CodegenUtils.h"
+#include "Utils/CodegenUtils.h"
#include "mlir/Conversion/LLVMCommon/StructBuilder.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorStorageLayout.h"
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
index 18b2bb0819e264..491501a3381b9c 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
@@ -15,8 +15,8 @@
//
//===----------------------------------------------------------------------===//
-#include "CodegenUtils.h"
-#include "SparseTensorDescriptor.h"
+#include "Utils/CodegenUtils.h"
+#include "Utils/SparseTensorDescriptor.h"
#include "mlir/Dialect/Arith/Utils/Utils.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
index e6052f2ca894c2..b0447b2436619e 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
@@ -16,7 +16,7 @@
//
//===----------------------------------------------------------------------===//
-#include "CodegenUtils.h"
+#include "Utils/CodegenUtils.h"
#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
index 4fc692f2fe9ddc..3b9685b8ae1e07 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
@@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//
-#include "CodegenUtils.h"
-#include "LoopEmitter.h"
+#include "Utils/CodegenUtils.h"
+#include "Utils/LoopEmitter.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp
index 561c4e25114602..7710a44a7ca052 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp
@@ -16,8 +16,8 @@
//
//===----------------------------------------------------------------------===//
-#include "CodegenUtils.h"
-#include "LoopEmitter.h"
+#include "Utils/CodegenUtils.h"
+#include "Utils/LoopEmitter.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
index 2367d3b5f37ade..934e1e559f44d6 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
@@ -10,9 +10,9 @@
//
//===----------------------------------------------------------------------===//
-#include "CodegenEnv.h"
-#include "CodegenUtils.h"
-#include "LoopEmitter.h"
+#include "Utils/CodegenEnv.h"
+#include "Utils/CodegenUtils.h"
+#include "Utils/LoopEmitter.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenEnv.cpp
similarity index 100%
rename from mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.cpp
rename to mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenEnv.cpp
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.h b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenEnv.h
similarity index 100%
rename from mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.h
rename to mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenEnv.h
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenUtils.cpp
similarity index 100%
rename from mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
rename to mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenUtils.cpp
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenUtils.h
similarity index 100%
rename from mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h
rename to mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenUtils.h
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/IterationGraphSorter.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.cpp
similarity index 100%
rename from mlir/lib/Dialect/SparseTensor/Transforms/IterationGraphSorter.cpp
rename to mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.cpp
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/IterationGraphSorter.h b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.h
similarity index 100%
rename from mlir/lib/Dialect/SparseTensor/Transforms/IterationGraphSorter.h
rename to mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.h
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp
similarity index 100%
rename from mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
rename to mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.h b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.h
similarity index 100%
rename from mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.h
rename to mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.h
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorDescriptor.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorDescriptor.cpp
similarity index 100%
rename from mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorDescriptor.cpp
rename to mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorDescriptor.cpp
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorDescriptor.h b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorDescriptor.h
similarity index 100%
rename from mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorDescriptor.h
rename to mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorDescriptor.h
>From f0f10beee22ff901ba23f0f51a8a560df1ba141b Mon Sep 17 00:00:00 2001
From: Aart Bik <ajcbik at google.com>
Date: Tue, 12 Dec 2023 14:44:18 -0800
Subject: [PATCH 2/3] bazel overlay
---
.../llvm-project-overlay/mlir/BUILD.bazel | 171 ++++++------------
1 file changed, 56 insertions(+), 115 deletions(-)
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 2e3bb8ad40b7cb..c3b8ea228ebd89 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -2773,13 +2773,9 @@ cc_library(
td_library(
name = "SparseTensorTdFiles",
- srcs = [
- "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td",
- "include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td",
- "include/mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.td",
- "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td",
- "include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.td",
- ],
+ srcs = glob([
+ "include/mlir/Dialect/SparseTensor/IR/*.td",
+ ]),
includes = ["include"],
deps = [
":InferTypeOpInterfaceTdFiles",
@@ -2788,15 +2784,6 @@ td_library(
],
)
-td_library(
- name = "SparseTensorInterfacesTdFiles",
- srcs = [
- "include/mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.td",
- ],
- includes = ["include"],
- deps = [":OpBaseTdFiles"],
-)
-
gentbl_cc_library(
name = "SparseTensorAttrDefsIncGen",
tbl_outs = [
@@ -2918,7 +2905,37 @@ gentbl_cc_library(
],
tblgen = ":mlir-tblgen",
td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.td",
- deps = [":SparseTensorInterfacesTdFiles"],
+ deps = [":SparseTensorTdFiles"],
+)
+
+td_library(
+ name = "SparseTensorTransformOpsTdFiles",
+ srcs = glob([
+ "include/mlir/Dialect/SparseTensor/TransformOps/*.td",
+ ]),
+ includes = ["include"],
+ deps = [
+ ":TransformDialectTdFiles",
+ ],
+)
+
+gentbl_cc_library(
+ name = "SparseTensorTransformOpsIncGen",
+ tbl_outs = [
+ (
+ ["-gen-op-decls"],
+ "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.h.inc",
+ ),
+ (
+ ["-gen-op-defs"],
+ "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.cpp.inc",
+ ),
+ ],
+ tblgen = ":mlir-tblgen",
+ td_file = "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.td",
+ deps = [
+ ":SparseTensorTransformOpsTdFiles",
+ ],
)
# This library is shared by both SparseTensorDialect and
@@ -2932,19 +2949,11 @@ cc_library(
cc_library(
name = "SparseTensorDialect",
- srcs = [
- "lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp",
- "lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.h",
- "lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp",
- "lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.h",
- "lib/Dialect/SparseTensor/IR/Detail/LvlTypeParser.cpp",
- "lib/Dialect/SparseTensor/IR/Detail/LvlTypeParser.h",
- "lib/Dialect/SparseTensor/IR/Detail/TemplateExtras.h",
- "lib/Dialect/SparseTensor/IR/Detail/Var.cpp",
- "lib/Dialect/SparseTensor/IR/Detail/Var.h",
- "lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp",
- "lib/Dialect/SparseTensor/IR/SparseTensorInterfaces.cpp",
- ],
+ srcs = glob([
+ "lib/Dialect/SparseTensor/IR/*.cpp",
+ "lib/Dialect/SparseTensor/IR/Detail/*.cpp",
+ "lib/Dialect/SparseTensor/IR/Detail/*.h",
+ ]),
hdrs = [
"include/mlir/Dialect/SparseTensor/IR/SparseTensor.h",
"include/mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.h",
@@ -2987,40 +2996,14 @@ cc_library(
],
)
-td_library(
- name = "SparseTensorTransformOpsTdFiles",
- srcs = glob([
- "include/mlir/Dialect/SparseTensor/TransformOps/*.td",
- ]),
- includes = ["include"],
- deps = [
- ":TransformDialectTdFiles",
- ],
-)
-
-gentbl_cc_library(
- name = "SparseTensorTransformOpsIncGen",
- tbl_outs = [
- (
- ["-gen-op-decls"],
- "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.h.inc",
- ),
- (
- ["-gen-op-defs"],
- "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.td",
- deps = [
- ":SparseTensorTransformOpsTdFiles",
- ],
-)
-
cc_library(
name = "SparseTensorUtils",
- srcs = glob(["lib/Dialect/SparseTensor/Utils/*.cpp"]),
- hdrs = glob(["include/mlir/Dialect/SparseTensor/Utils/*.h"]),
+ srcs = glob([
+ "lib/Dialect/SparseTensor/Utils/*.cpp",
+ ]),
+ hdrs = glob([
+ "include/mlir/Dialect/SparseTensor/Utils/*.h",
+ ]),
includes = ["include"],
deps = [
":ArithDialect",
@@ -3030,7 +3013,7 @@ cc_library(
":MathDialect",
":SparseTensorDialect",
":SparseTensorEnums",
- "//llvm:Support",
+ "//llvm-project/llvm:Support",
],
)
@@ -3039,6 +3022,8 @@ cc_library(
srcs = glob([
"lib/Dialect/SparseTensor/Transforms/*.cpp",
"lib/Dialect/SparseTensor/Transforms/*.h",
+ "lib/Dialect/SparseTensor/Transforms/Utils/*.cpp",
+ "lib/Dialect/SparseTensor/Transforms/Utils/*.h",
]),
hdrs = [
"include/mlir/Dialect/SparseTensor/Transforms/BufferizableOpInterfaceImpl.h",
@@ -3081,8 +3066,12 @@ cc_library(
cc_library(
name = "SparseTensorPipelines",
- srcs = glob(["lib/Dialect/SparseTensor/Pipelines/*.cpp"]),
- hdrs = ["include/mlir/Dialect/SparseTensor/Pipelines/Passes.h"],
+ srcs = glob([
+ "lib/Dialect/SparseTensor/Pipelines/*.cpp",
+ ]),
+ hdrs = [
+ "include/mlir/Dialect/SparseTensor/Pipelines/Passes.h",
+ ],
includes = ["include"],
local_defines = if_cuda_available(["MLIR_GPU_TO_CUBIN_PASS_ENABLE"]),
deps = [
@@ -3267,14 +3256,11 @@ cc_library(
hdrs = glob(["include/mlir/Dialect/Mesh/Transforms/*.h"]),
includes = ["include"],
deps = [
- ":ArithDialect",
":FuncDialect",
- ":IR",
":MeshDialect",
":MeshShardingInterface",
":MeshTransformsPassIncGen",
":Pass",
- ":TransformUtils",
"//llvm:Support",
],
)
@@ -6152,32 +6138,6 @@ gentbl_cc_library(
deps = [":NVVMOpsTdFiles"],
)
-gentbl_cc_library(
- name = "NVVMFromLLVMIRConversionsIncGen",
- tbl_outs = [
- (
- ["-gen-intr-from-llvmir-conversions"],
- "include/mlir/Dialect/LLVMIR/NVVMFromLLVMIRConversions.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
- deps = [":NVVMOpsTdFiles"],
-)
-
-gentbl_cc_library(
- name = "NVVMConvertibleLLVMIRIntrinsicsIncGen",
- tbl_outs = [
- (
- ["-gen-convertible-llvmir-intrinsics"],
- "include/mlir/Dialect/LLVMIR/NVVMConvertibleLLVMIRIntrinsics.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
- deps = [":NVVMOpsTdFiles"],
-)
-
cc_library(
name = "BasicPtxBuilderInterface",
srcs = ["lib/Dialect/LLVMIR/IR/BasicPtxBuilderInterface.cpp"],
@@ -8379,8 +8339,8 @@ cc_library(
cc_library(
name = "NVVMToLLVMIRTranslation",
- srcs = ["lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp"],
- hdrs = ["include/mlir/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.h"],
+ srcs = glob(["lib/Target/LLVMIR/Dialect/NVVM/*.cpp"]),
+ hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/NVVM/*.h"]),
includes = ["include"],
deps = [
":DialectUtils",
@@ -8497,23 +8457,6 @@ cc_library(
],
)
-cc_library(
- name = "LLVMIRToNVVMTranslation",
- srcs = ["lib/Target/LLVMIR/Dialect/NVVM/LLVMIRToNVVMTranslation.cpp"],
- hdrs = ["include/mlir/Target/LLVMIR/Dialect/NVVM/LLVMIRToNVVMTranslation.h"],
- includes = ["include"],
- deps = [
- ":FromLLVMIRTranslation",
- ":IR",
- ":NVVMConvertibleLLVMIRIntrinsicsIncGen",
- ":NVVMDialect",
- ":NVVMFromLLVMIRConversionsIncGen",
- ":Support",
- "//llvm:Core",
- "//llvm:Support",
- ],
-)
-
cc_library(
name = "OpenACCToLLVMIRTranslation",
srcs = glob(["lib/Target/LLVMIR/Dialect/OpenACC/*.cpp"]),
@@ -8567,7 +8510,6 @@ cc_library(
":BuiltinToLLVMIRTranslation",
":GPUToLLVMIRTranslation",
":LLVMIRToLLVMTranslation",
- ":LLVMIRToNVVMTranslation",
":LLVMToLLVMIRTranslation",
":NVVMTarget",
":NVVMToLLVMIRTranslation",
@@ -8971,7 +8913,6 @@ cc_binary(
"//mlir/test:TestLoopLikeInterface",
"//mlir/test:TestMath",
"//mlir/test:TestMemRef",
- "//mlir/test:TestMesh",
"//mlir/test:TestNVGPU",
"//mlir/test:TestOneToNTypeConversion",
"//mlir/test:TestPDLL",
>From cb7d753142a31ca78a09396e6e89aab950996fb8 Mon Sep 17 00:00:00 2001
From: Aart Bik <ajcbik at google.com>
Date: Tue, 12 Dec 2023 14:47:20 -0800
Subject: [PATCH 3/3] typo
---
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index c3b8ea228ebd89..30a0ea08905dc8 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -3013,7 +3013,7 @@ cc_library(
":MathDialect",
":SparseTensorDialect",
":SparseTensorEnums",
- "//llvm-project/llvm:Support",
+ "//llvm:Support",
],
)
More information about the Mlir-commits
mailing list