From: Aart Bik Date: Tue, 16 May 2023 17:00:36 +0000 (-0700) Subject: [mlir][sparse][gpu] set cubin flag when building for cuda X-Git-Tag: upstream/17.0.6~8290 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=195621aacb96a4e2f49f5d888e2fc7af20e6e797;p=platform%2Fupstream%2Fllvm.git [mlir][sparse][gpu] set cubin flag when building for cuda Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D150692 --- diff --git a/mlir/lib/Dialect/SparseTensor/Pipelines/CMakeLists.txt b/mlir/lib/Dialect/SparseTensor/Pipelines/CMakeLists.txt index 234a0d8..939d748 100644 --- a/mlir/lib/Dialect/SparseTensor/Pipelines/CMakeLists.txt +++ b/mlir/lib/Dialect/SparseTensor/Pipelines/CMakeLists.txt @@ -27,3 +27,11 @@ add_mlir_dialect_library(MLIRSparseTensorPipelines MLIRVectorToLLVM MLIRVectorTransforms ) + +if(MLIR_ENABLE_CUDA_RUNNER) + # Enable gpu-to-cubin pass. + target_compile_definitions(obj.MLIRSparseTensorPipelines + PRIVATE + MLIR_GPU_TO_CUBIN_PASS_ENABLE=1 + ) +endif()