File tree 3 files changed +12
-3
lines changed
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.4...3.22 )
1
+ cmake_minimum_required (VERSION 3.21 )
2
2
3
3
project (llama_cpp)
4
4
@@ -33,4 +33,13 @@ if (LLAMA_BUILD)
33
33
FRAMEWORK DESTINATION ${CMAKE_CURRENT_SOURCE_DIR} /llama_cpp
34
34
RESOURCE DESTINATION ${CMAKE_CURRENT_SOURCE_DIR} /llama_cpp
35
35
)
36
+ # Workaround for Windows + CUDA https://github.com/abetlen/llama-cpp-python/issues/563
37
+ install (
38
+ FILES $<TARGET_RUNTIME_DLLS:llama>
39
+ DESTINATION ${SKBUILD_PLATLIB_DIR} /llama_cpp
40
+ )
41
+ install (
42
+ FILES $<TARGET_RUNTIME_DLLS:llama>
43
+ DESTINATION ${CMAKE_CURRENT_SOURCE_DIR} /llama_cpp
44
+ )
36
45
endif ()
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def _load_shared_library(lib_base_name: str):
58
58
if "CUDA_PATH" in os .environ :
59
59
os .add_dll_directory (os .path .join (os .environ ["CUDA_PATH" ], "bin" ))
60
60
os .add_dll_directory (os .path .join (os .environ ["CUDA_PATH" ], "lib" ))
61
- cdll_args ["winmode" ] = 0
61
+ cdll_args ["winmode" ] = ctypes . RTLD_GLOBAL
62
62
63
63
# Try to load the shared library, handling potential errors
64
64
for _lib_path in _lib_paths :
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ all = [
54
54
[tool .scikit-build ]
55
55
wheel.packages = [" llama_cpp" ]
56
56
cmake.verbose = true
57
- cmake.minimum-version = " 3.12 "
57
+ cmake.minimum-version = " 3.21 "
58
58
minimum-version = " 0.5"
59
59
sdist.exclude = [" .git" , " vendor/llama.cpp/.git" ]
60
60
You can’t perform that action at this time.
0 commit comments