[Mlir-commits] [llvm] [mlir] [mlir] Replace MLIR_ENABLE_CUDA_CONVERSIONS with LLVM_HAS_NVPTX_TARGET (PR #93008)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Fri May 24 02:56:58 PDT 2024


================
@@ -25,7 +25,9 @@ config.mlir_cmake_dir = "@MLIR_CMAKE_DIR@"
 config.mlir_lib_dir = "@MLIR_LIB_DIR@"
 
 config.build_examples = @LLVM_BUILD_EXAMPLES@
-config.run_cuda_tests = @MLIR_ENABLE_CUDA_CONVERSIONS@
+# We need quotes here to handle the case where LLVM_HAS_NVPTX_TARGET
+# is not defined (i.e. NVPTX target not built).
+config.run_nvptx_tests = "@LLVM_HAS_NVPTX_TARGET@"
----------------
ftynse wrote:

I think it should be always defined to either 0 or 1. It comes from https://github.com/llvm/llvm-project/blob/b2f65e809e423b988e66b96029b5effe766cc62d/llvm/include/llvm/Config/llvm-config.h.cmake#L100
where it is a `#cmakedefine01` guaranteeing that and is being used with `#if` rather than `#ifdef`.

https://github.com/llvm/llvm-project/pull/93008


More information about the Mlir-commits mailing list