Skip to content

Commit 4388f33

Browse files
committed
Set CUDA_ARCHITECTURES=OFF for windows
1 parent 74167bd commit 4388f33

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ option(LLAMA_BUILD "Build llama.cpp shared library and install alongside python
66

77
if (LLAMA_BUILD)
88
set(BUILD_SHARED_LIBS "On")
9+
10+
# Building llama
911
if (APPLE AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
1012
# Need to disable these llama.cpp flags on Apple x86_64,
1113
# otherwise users may encounter invalid instruction errors
@@ -41,8 +43,14 @@ if (LLAMA_BUILD)
4143
FILES $<TARGET_RUNTIME_DLLS:llama>
4244
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/llama_cpp
4345
)
46+
47+
# Building llava
4448
add_subdirectory(vendor/llama.cpp/examples/llava)
4549
set_target_properties(llava_shared PROPERTIES OUTPUT_NAME "llava")
50+
# Set CUDA_ARCHITECTURES to OFF on windows
51+
if (WIN32)
52+
set_target_properties(llava_shared PROPERTIES CUDA_ARCHITECTURES OFF)
53+
endif()
4654
install(
4755
TARGETS llava_shared
4856
LIBRARY DESTINATION ${SKBUILD_PLATLIB_DIR}/llama_cpp

0 commit comments

Comments
 (0)