This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 827beed0d6 [CMake] Enable cuda lang if USE_CUDA is on (#16426)
827beed0d6 is described below
commit 827beed0d6e130c3b3854ee27cbce632f7917867
Author: Wuwei Lin <[email protected]>
AuthorDate: Thu Jan 18 16:35:32 2024 -0800
[CMake] Enable cuda lang if USE_CUDA is on (#16426)
---
cmake/modules/CUDA.cmake | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/cmake/modules/CUDA.cmake b/cmake/modules/CUDA.cmake
index bbbf6b89ba..e66d3ba9fc 100644
--- a/cmake/modules/CUDA.cmake
+++ b/cmake/modules/CUDA.cmake
@@ -29,6 +29,7 @@ if(USE_CUDA)
message(FATAL_ERROR "Cannot find CUDA, USE_CUDA=" ${USE_CUDA})
endif()
message(STATUS "Build with CUDA ${CUDA_VERSION} support")
+ enable_language(CUDA)
tvm_file_glob(GLOB RUNTIME_CUDA_SRCS src/runtime/cuda/*.cc)
list(APPEND RUNTIME_SRCS ${RUNTIME_CUDA_SRCS})
list(APPEND COMPILER_SRCS src/target/opt/build_cuda_on.cc)
@@ -62,8 +63,6 @@ if(USE_CUDA)
if(USE_THRUST)
message(STATUS "Build with Thrust support")
- cmake_minimum_required(VERSION 3.13) # to compile CUDA code
- enable_language(CUDA)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-extended-lambda")
tvm_file_glob(GLOB CONTRIB_THRUST_SRC src/runtime/contrib/thrust/*.cu)
list(APPEND RUNTIME_SRCS ${CONTRIB_THRUST_SRC})
@@ -72,8 +71,6 @@ if(USE_CUDA)
if(USE_CURAND)
message(STATUS "Build with cuRAND support")
message(STATUS "${CUDA_CURAND_LIBRARY}")
- cmake_minimum_required(VERSION 3.13) # to compile CUDA code
- enable_language(CUDA)
tvm_file_glob(GLOB CONTRIB_CURAND_SRC_CC src/runtime/contrib/curand/*.cc)
tvm_file_glob(GLOB CONTRIB_CURAND_SRC_CU src/runtime/contrib/curand/*.cu)
list(APPEND TVM_RUNTIME_LINKER_LIBS ${CUDA_CURAND_LIBRARY})