Skip to content

Commit

Permalink
Dev: mark WIN32 CUDA dlls as 'DELAYLOAD'
Browse files Browse the repository at this point in the history
  • Loading branch information
vs-savchenko committed Sep 16, 2024
1 parent ee8c962 commit 7cb5b71
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,16 @@ if (GGML_SOURCES_CUDA)
set_property(TARGET whisper PROPERTY CUDA_SELECT_NVCC_ARCH_FLAGS "Auto")
endif()

if (WHISPER_CUDA)
if (WIN32)
message(STATUS "Mark CUDA libraries as DELAYLOAD")
target_link_options(${TARGET} PRIVATE "/DELAYLOAD:cublas64_12.dll")
target_link_options(${TARGET} PRIVATE "/DELAYLOAD:cublasLt64_12.dll")
target_link_options(${TARGET} PRIVATE "/DELAYLOAD:cudart64_12.dll")
target_link_options(${TARGET} PRIVATE "/DELAYLOAD:nvcuda.dll")
endif()
endif()

if (EMSCRIPTEN)
set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS "-msimd128")
endif()
Expand Down

0 comments on commit 7cb5b71

Please sign in to comment.