[Mlir-commits] [mlir] 9d7be77 - [mlir] Move cuda tests
Christian Sigg
llvmlistbot at llvm.org
Wed Mar 3 04:17:01 PST 2021
Author: Christian Sigg
Date: 2021-03-03T13:16:51+01:00
New Revision: 9d7be77bf91e97e30fd680a07d09eb9f5d78c5bd
URL: https://github.com/llvm/llvm-project/commit/9d7be77bf91e97e30fd680a07d09eb9f5d78c5bd
DIFF: https://github.com/llvm/llvm-project/commit/9d7be77bf91e97e30fd680a07d09eb9f5d78c5bd.diff
LOG: [mlir] Move cuda tests
Move test inputs to test/Integration directory.
Move runtime wrappers to ExecutionEngine.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D97463
Added:
mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
mlir/test/Integration/GPU/CUDA/all-reduce-and.mlir
mlir/test/Integration/GPU/CUDA/all-reduce-max.mlir
mlir/test/Integration/GPU/CUDA/all-reduce-min.mlir
mlir/test/Integration/GPU/CUDA/all-reduce-op.mlir
mlir/test/Integration/GPU/CUDA/all-reduce-or.mlir
mlir/test/Integration/GPU/CUDA/all-reduce-region.mlir
mlir/test/Integration/GPU/CUDA/all-reduce-xor.mlir
mlir/test/Integration/GPU/CUDA/async.mlir
mlir/test/Integration/GPU/CUDA/gpu-to-cubin.mlir
mlir/test/Integration/GPU/CUDA/lit.local.cfg
mlir/test/Integration/GPU/CUDA/multiple-all-reduce.mlir
mlir/test/Integration/GPU/CUDA/shuffle.mlir
mlir/test/Integration/GPU/CUDA/two-modules.mlir
Modified:
mlir/lib/ExecutionEngine/CMakeLists.txt
mlir/test/CMakeLists.txt
mlir/test/lit.cfg.py
mlir/test/lit.site.cfg.py.in
mlir/tools/mlir-cuda-runner/CMakeLists.txt
Removed:
mlir/test/mlir-cuda-runner/all-reduce-and.mlir
mlir/test/mlir-cuda-runner/all-reduce-max.mlir
mlir/test/mlir-cuda-runner/all-reduce-min.mlir
mlir/test/mlir-cuda-runner/all-reduce-op.mlir
mlir/test/mlir-cuda-runner/all-reduce-or.mlir
mlir/test/mlir-cuda-runner/all-reduce-region.mlir
mlir/test/mlir-cuda-runner/all-reduce-xor.mlir
mlir/test/mlir-cuda-runner/async.mlir
mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir
mlir/test/mlir-cuda-runner/lit.local.cfg
mlir/test/mlir-cuda-runner/multiple-all-reduce.mlir
mlir/test/mlir-cuda-runner/shuffle.mlir
mlir/test/mlir-cuda-runner/two-modules.mlir
mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp
################################################################################
diff --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index d626e8c94b77..1ec6a8cf9698 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -4,6 +4,7 @@
set(LLVM_OPTIONAL_SOURCES
AsyncRuntime.cpp
CRunnerUtils.cpp
+ CudaRuntimeWrappers.cpp
SparseUtils.cpp
ExecutionEngine.cpp
RunnerUtils.cpp
@@ -102,3 +103,34 @@ add_mlir_library(mlir_async_runtime
set_property(TARGET mlir_async_runtime PROPERTY CXX_VISIBILITY_PRESET hidden)
target_compile_definitions(mlir_async_runtime PRIVATE mlir_async_runtime_EXPORTS)
+if(MLIR_CUDA_RUNNER_ENABLED)
+ # Configure CUDA support. Using check_language first allows us to give a
+ # custom error message.
+ include(CheckLanguage)
+ check_language(CUDA)
+ if (CMAKE_CUDA_COMPILER)
+ enable_language(CUDA)
+ else()
+ message(SEND_ERROR
+ "Building the mlir cuda runner requires a working CUDA install")
+ endif()
+
+ # We need the libcuda.so library.
+ find_library(CUDA_RUNTIME_LIBRARY cuda)
+
+ add_mlir_library(mlir_cuda_runtime
+ SHARED
+ CudaRuntimeWrappers.cpp
+
+ EXCLUDE_FROM_LIBMLIR
+ )
+ set_property(TARGET mlir_cuda_runtime PROPERTY CXX_STANDARD 14)
+ target_include_directories(mlir_cuda_runtime
+ PRIVATE
+ ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
+ )
+ target_link_libraries(mlir_cuda_runtime
+ PRIVATE
+ ${CUDA_RUNTIME_LIBRARY}
+ )
+endif()
diff --git a/mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp b/mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
similarity index 98%
rename from mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp
rename to mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
index 3cc2727bd45f..09df52f2aae2 100644
--- a/mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp
+++ b/mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
@@ -1,4 +1,4 @@
-//===- cuda-runtime-wrappers.cpp - MLIR CUDA runner wrapper library -------===//
+//===- CudaRuntimeWrappers.cpp - MLIR CUDA API wrapper library ------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt
index f5cb00472bef..6f4c2384a798 100644
--- a/mlir/test/CMakeLists.txt
+++ b/mlir/test/CMakeLists.txt
@@ -21,8 +21,7 @@ set(MLIR_DIALECT_LINALG_INTEGRATION_TEST_LIB_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTOR
set(MLIR_RUNNER_UTILS_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
# Passed to lit.site.cfg.py.in to set up the path where to find the libraries
-# for the mlir cuda / rocm / spirv / vulkan runner tests.
-set(MLIR_CUDA_WRAPPER_LIBRARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+# for the mlir rocm / spirv / vulkan runner tests.
set(MLIR_ROCM_WRAPPER_LIBRARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(MLIR_SPIRV_WRAPPER_LIBRARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(MLIR_VULKAN_WRAPPER_LIBRARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
@@ -70,6 +69,10 @@ set(MLIR_TEST_DEPENDS
mlir_async_runtime
)
+if(MLIR_CUDA_RUNNER_ENABLED)
+ list(APPEND MLIR_TEST_DEPENDS mlir_cuda_runtime)
+endif()
+
list(APPEND MLIR_TEST_DEPENDS MLIRUnitTests)
if(LLVM_BUILD_EXAMPLES)
diff --git a/mlir/test/mlir-cuda-runner/all-reduce-and.mlir b/mlir/test/Integration/GPU/CUDA/all-reduce-and.mlir
similarity index 96%
rename from mlir/test/mlir-cuda-runner/all-reduce-and.mlir
rename to mlir/test/Integration/GPU/CUDA/all-reduce-and.mlir
index 0818a58d1518..fca7c4bfb00c 100644
--- a/mlir/test/mlir-cuda-runner/all-reduce-and.mlir
+++ b/mlir/test/Integration/GPU/CUDA/all-reduce-and.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/mlir-cuda-runner/all-reduce-max.mlir b/mlir/test/Integration/GPU/CUDA/all-reduce-max.mlir
similarity index 96%
rename from mlir/test/mlir-cuda-runner/all-reduce-max.mlir
rename to mlir/test/Integration/GPU/CUDA/all-reduce-max.mlir
index 10c2fedc8563..7a848c5991ef 100644
--- a/mlir/test/mlir-cuda-runner/all-reduce-max.mlir
+++ b/mlir/test/Integration/GPU/CUDA/all-reduce-max.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/mlir-cuda-runner/all-reduce-min.mlir b/mlir/test/Integration/GPU/CUDA/all-reduce-min.mlir
similarity index 96%
rename from mlir/test/mlir-cuda-runner/all-reduce-min.mlir
rename to mlir/test/Integration/GPU/CUDA/all-reduce-min.mlir
index 7e83f911cd29..2e9977ddb280 100644
--- a/mlir/test/mlir-cuda-runner/all-reduce-min.mlir
+++ b/mlir/test/Integration/GPU/CUDA/all-reduce-min.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/mlir-cuda-runner/all-reduce-op.mlir b/mlir/test/Integration/GPU/CUDA/all-reduce-op.mlir
similarity index 94%
rename from mlir/test/mlir-cuda-runner/all-reduce-op.mlir
rename to mlir/test/Integration/GPU/CUDA/all-reduce-op.mlir
index f211ae474b10..b7b0d4aebbf7 100644
--- a/mlir/test/mlir-cuda-runner/all-reduce-op.mlir
+++ b/mlir/test/Integration/GPU/CUDA/all-reduce-op.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/mlir-cuda-runner/all-reduce-or.mlir b/mlir/test/Integration/GPU/CUDA/all-reduce-or.mlir
similarity index 96%
rename from mlir/test/mlir-cuda-runner/all-reduce-or.mlir
rename to mlir/test/Integration/GPU/CUDA/all-reduce-or.mlir
index cb30391c23d4..f970b4cee960 100644
--- a/mlir/test/mlir-cuda-runner/all-reduce-or.mlir
+++ b/mlir/test/Integration/GPU/CUDA/all-reduce-or.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/mlir-cuda-runner/all-reduce-region.mlir b/mlir/test/Integration/GPU/CUDA/all-reduce-region.mlir
similarity index 93%
rename from mlir/test/mlir-cuda-runner/all-reduce-region.mlir
rename to mlir/test/Integration/GPU/CUDA/all-reduce-region.mlir
index 0e097b53b1ad..925b0fe0db66 100644
--- a/mlir/test/mlir-cuda-runner/all-reduce-region.mlir
+++ b/mlir/test/Integration/GPU/CUDA/all-reduce-region.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/mlir-cuda-runner/all-reduce-xor.mlir b/mlir/test/Integration/GPU/CUDA/all-reduce-xor.mlir
similarity index 96%
rename from mlir/test/mlir-cuda-runner/all-reduce-xor.mlir
rename to mlir/test/Integration/GPU/CUDA/all-reduce-xor.mlir
index 7d6e690eb592..55ea5689db30 100644
--- a/mlir/test/mlir-cuda-runner/all-reduce-xor.mlir
+++ b/mlir/test/Integration/GPU/CUDA/all-reduce-xor.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/mlir-cuda-runner/async.mlir b/mlir/test/Integration/GPU/CUDA/async.mlir
similarity index 96%
rename from mlir/test/mlir-cuda-runner/async.mlir
rename to mlir/test/Integration/GPU/CUDA/async.mlir
index efc028743b1a..f5c1fd9fd0b1 100644
--- a/mlir/test/mlir-cuda-runner/async.mlir
+++ b/mlir/test/Integration/GPU/CUDA/async.mlir
@@ -3,7 +3,7 @@
// RUN: -gpu-async-region -async-ref-counting \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
// RUN: -async-to-async-runtime -convert-async-to-llvm -convert-std-to-llvm \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_async_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void -O0 \
diff --git a/mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir b/mlir/test/Integration/GPU/CUDA/gpu-to-cubin.mlir
similarity index 93%
rename from mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir
rename to mlir/test/Integration/GPU/CUDA/gpu-to-cubin.mlir
index f5ce4bb37d60..6970c457c0fd 100644
--- a/mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir
+++ b/mlir/test/Integration/GPU/CUDA/gpu-to-cubin.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/mlir-cuda-runner/lit.local.cfg b/mlir/test/Integration/GPU/CUDA/lit.local.cfg
similarity index 100%
rename from mlir/test/mlir-cuda-runner/lit.local.cfg
rename to mlir/test/Integration/GPU/CUDA/lit.local.cfg
diff --git a/mlir/test/mlir-cuda-runner/multiple-all-reduce.mlir b/mlir/test/Integration/GPU/CUDA/multiple-all-reduce.mlir
similarity index 96%
rename from mlir/test/mlir-cuda-runner/multiple-all-reduce.mlir
rename to mlir/test/Integration/GPU/CUDA/multiple-all-reduce.mlir
index 0ebc05719d07..e23472611f79 100644
--- a/mlir/test/mlir-cuda-runner/multiple-all-reduce.mlir
+++ b/mlir/test/Integration/GPU/CUDA/multiple-all-reduce.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/mlir-cuda-runner/shuffle.mlir b/mlir/test/Integration/GPU/CUDA/shuffle.mlir
similarity index 94%
rename from mlir/test/mlir-cuda-runner/shuffle.mlir
rename to mlir/test/Integration/GPU/CUDA/shuffle.mlir
index 3af479c37221..e81bc696fdfb 100644
--- a/mlir/test/mlir-cuda-runner/shuffle.mlir
+++ b/mlir/test/Integration/GPU/CUDA/shuffle.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/mlir-cuda-runner/two-modules.mlir b/mlir/test/Integration/GPU/CUDA/two-modules.mlir
similarity index 94%
rename from mlir/test/mlir-cuda-runner/two-modules.mlir
rename to mlir/test/Integration/GPU/CUDA/two-modules.mlir
index de3fe848ac1c..61b42dcab009 100644
--- a/mlir/test/mlir-cuda-runner/two-modules.mlir
+++ b/mlir/test/Integration/GPU/CUDA/two-modules.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-cuda-runner %s \
// RUN: -gpu-to-cubin="gpu-binary-annotation=nvvm.cubin" \
// RUN: -gpu-to-llvm="gpu-binary-annotation=nvvm.cubin" \
-// RUN: --shared-libs=%cuda_wrapper_library_dir/libcuda-runtime-wrappers%shlibext \
+// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \
// RUN: --shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext \
// RUN: --entry-point-result=void \
// RUN: | FileCheck %s
diff --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py
index d205b1efc039..4ba36202578d 100644
--- a/mlir/test/lit.cfg.py
+++ b/mlir/test/lit.cfg.py
@@ -75,7 +75,6 @@
ToolSubst('toy-ch3', unresolved='ignore'),
ToolSubst('toy-ch4', unresolved='ignore'),
ToolSubst('toy-ch5', unresolved='ignore'),
- ToolSubst('%cuda_wrapper_library_dir', config.cuda_wrapper_library_dir, unresolved='ignore'),
ToolSubst('%linalg_test_lib_dir', config.linalg_test_lib_dir, unresolved='ignore'),
ToolSubst('%mlir_runner_utils_dir', config.mlir_runner_utils_dir, unresolved='ignore'),
ToolSubst('%rocm_wrapper_library_dir', config.rocm_wrapper_library_dir, unresolved='ignore'),
diff --git a/mlir/test/lit.site.cfg.py.in b/mlir/test/lit.site.cfg.py.in
index f8f7183e3480..c34e7e4ce62e 100644
--- a/mlir/test/lit.site.cfg.py.in
+++ b/mlir/test/lit.site.cfg.py.in
@@ -36,7 +36,6 @@ config.mlir_tools_dir = "@MLIR_TOOLS_DIR@"
config.linalg_test_lib_dir = "@MLIR_DIALECT_LINALG_INTEGRATION_TEST_LIB_DIR@"
config.build_examples = @LLVM_BUILD_EXAMPLES@
config.run_cuda_tests = @MLIR_CUDA_CONVERSIONS_ENABLED@
-config.cuda_wrapper_library_dir = "@MLIR_CUDA_WRAPPER_LIBRARY_DIR@"
config.enable_cuda_runner = @MLIR_CUDA_RUNNER_ENABLED@
config.run_rocm_tests = @MLIR_ROCM_CONVERSIONS_ENABLED@
config.rocm_wrapper_library_dir = "@MLIR_ROCM_WRAPPER_LIBRARY_DIR@"
diff --git a/mlir/tools/mlir-cuda-runner/CMakeLists.txt b/mlir/tools/mlir-cuda-runner/CMakeLists.txt
index fe59fe1a87a8..62ded09bc789 100644
--- a/mlir/tools/mlir-cuda-runner/CMakeLists.txt
+++ b/mlir/tools/mlir-cuda-runner/CMakeLists.txt
@@ -1,5 +1,4 @@
set(LLVM_OPTIONAL_SOURCES
- cuda-runtime-wrappers.cpp
mlir-cuda-runner.cpp
)
set(LLVM_LINK_COMPONENTS
@@ -27,21 +26,6 @@ if(MLIR_CUDA_RUNNER_ENABLED)
# We need the libcuda.so library.
find_library(CUDA_RUNTIME_LIBRARY cuda)
- add_mlir_library(cuda-runtime-wrappers
- SHARED
- cuda-runtime-wrappers.cpp
-
- EXCLUDE_FROM_LIBMLIR
- )
- target_include_directories(cuda-runtime-wrappers
- PRIVATE
- ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
- )
- target_link_libraries(cuda-runtime-wrappers
- PRIVATE
- ${CUDA_RUNTIME_LIBRARY}
- )
-
get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
set(LIBS
${conversion_libs}
@@ -79,7 +63,7 @@ if(MLIR_CUDA_RUNNER_ENABLED)
mlir-cuda-runner.cpp
DEPENDS
- cuda-runtime-wrappers
+ mlir_cuda_runtime
)
target_include_directories(mlir-cuda-runner
PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
More information about the Mlir-commits
mailing list