Skip to content

Commit 46d2f26

Browse files
committed
[FIX][CUDA] Require driver symbols in runtime sidecar
1 parent f98bf52 commit 46d2f26

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cmake/modules/CUDA.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ if(USE_CUDA)
2828
if(NOT CUDA_FOUND)
2929
message(FATAL_ERROR "Cannot find CUDA, USE_CUDA=" ${USE_CUDA})
3030
endif()
31+
if(NOT CUDA_CUDA_LIBRARY)
32+
message(FATAL_ERROR "Cannot find CUDA driver library required by tvm_runtime_cuda")
33+
endif()
3134
message(STATUS "Build with CUDA ${CUDA_VERSION} support")
3235
enable_language(CUDA)
3336

@@ -78,6 +81,7 @@ if(USE_CUDA)
7881
add_library(tvm_runtime_cuda SHARED $<TARGET_OBJECTS:tvm_runtime_cuda_objs>)
7982
list(APPEND TVM_RUNTIME_BACKEND_LIBS tvm_runtime_cuda)
8083
target_link_libraries(tvm_runtime_cuda PUBLIC tvm_runtime ${CUDA_CUDART_LIBRARY} ${CUDA_CUDA_LIBRARY})
84+
set_property(TARGET tvm_runtime_cuda APPEND PROPERTY LINK_OPTIONS "${TVM_NO_UNDEFINED_SYMBOLS}")
8185
tvm_configure_target_library(tvm_runtime_cuda RUNTIME_MODULE)
8286

8387
if(USE_NVTX)

0 commit comments

Comments
 (0)