[Mlir-commits] [mlir] 68b7d3f - [mlir][gpu][transforms] Only depend on ExecutionEngine if MLIR_ENABLE_CUDA_RUNNER is true

Nicolas Vasilache llvmlistbot at llvm.org
Mon Jul 24 16:26:45 PDT 2023


Author: Nicolas Vasilache
Date: 2023-07-25T01:26:03+02:00
New Revision: 68b7d3fffd7e8ebc40fdcb0acdcf2e88a93ea5c3

URL: https://github.com/llvm/llvm-project/commit/68b7d3fffd7e8ebc40fdcb0acdcf2e88a93ea5c3
DIFF: https://github.com/llvm/llvm-project/commit/68b7d3fffd7e8ebc40fdcb0acdcf2e88a93ea5c3.diff

LOG: [mlir][gpu][transforms] Only depend on ExecutionEngine if MLIR_ENABLE_CUDA_RUNNER is true

This fixes a compilation bug where we would try to depend on ExecutionEngine but it wasn't actually built.

Added: 
    

Modified: 
    mlir/test/lib/Dialect/GPU/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/test/lib/Dialect/GPU/CMakeLists.txt b/mlir/test/lib/Dialect/GPU/CMakeLists.txt
index c972a8a8204689..ad537be56d77c6 100644
--- a/mlir/test/lib/Dialect/GPU/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/GPU/CMakeLists.txt
@@ -8,7 +8,6 @@ set(LIBS
   MLIRAnalysis
   MLIRArithDialect
   MLIRBuiltinToLLVMIRTranslation
-  MLIRExecutionEngine
   MLIRFuncDialect
   MLIRGPUDialect
   MLIRGPUToGPURuntimeTransforms
@@ -35,6 +34,22 @@ set(LIBS
   MLIRVectorToLLVM
   )
 
+# This is how it is defined in mlir/lib/Dialect/GPU/CMakeLists.txt
+# We probably want something better project-wide
+if(MLIR_ENABLE_CUDA_RUNNER)
+  # Enable gpu-to-cubin pass.
+  target_compile_definitions(MLIRGPUTestPasses
+    PRIVATE
+    MLIR_GPU_TO_CUBIN_PASS_ENABLE=1
+  )
+
+  set(LIBS
+    ${LIBS}
+
+    MLIRExecutionEngine
+  )
+endif()
+
 add_mlir_library(MLIRGPUTestPasses
   TestConvertGPUKernelToCubin.cpp
   TestConvertGPUKernelToHsaco.cpp
@@ -47,13 +62,3 @@ add_mlir_library(MLIRGPUTestPasses
   LINK_LIBS PUBLIC
   ${LIBS}
   )
-
-# This is how it is defined in mlir/lib/Dialect/GPU/CMakeLists.txt
-# We probably want something better project-wide
-if(MLIR_ENABLE_CUDA_RUNNER)
-  # Enable gpu-to-cubin pass.
-  target_compile_definitions(MLIRGPUTestPasses
-    PRIVATE
-    MLIR_GPU_TO_CUBIN_PASS_ENABLE=1
-  )
-endif()


        


More information about the Mlir-commits mailing list