Skip to content

Commit a32f282

Browse files
[mlir][bazel] Define MLIR_CUDA_CONVERSIONS_ENABLED in GPU targets.
The `BUILD` files of two CUDA-related build targets were missing that definition such that the corresponding MLIR target libraries did not actually work.
1 parent c4e9463 commit a32f282

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5504,6 +5504,7 @@ cc_library(
55045504
],
55055505
),
55065506
hdrs = glob(["include/mlir/Dialect/GPU/Transforms/*.h"]),
5507+
defines = if_cuda_available(["MLIR_CUDA_CONVERSIONS_ENABLED"]),
55075508
includes = ["include"],
55085509
local_defines = if_cuda_available(["MLIR_GPU_TO_CUBIN_PASS_ENABLE"]),
55095510
deps = [
@@ -6168,6 +6169,9 @@ cc_library(
61686169
srcs = ["lib/Target/LLVM/NVVM/Target.cpp"],
61696170
hdrs = glob(["include/mlir/Target/LLVM/NVVM/*.h"]),
61706171
includes = ["include"],
6172+
local_defines = [
6173+
"MLIR_CUDA_CONVERSIONS_ENABLED",
6174+
],
61716175
deps = [
61726176
":GPUDialect",
61736177
":GPUToLLVMIRTranslation",

0 commit comments

Comments
 (0)