Skip to content

Commit 1a4f54d

Browse files
committed
update for cu13 builds (no ci will be provided)
1 parent 8b5ebfc commit 1a4f54d

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ if (LLAMA_CUBLAS)
130130
# 75 == int8 tensor cores
131131
# 80 == Ampere, asynchronous data loading, faster tensor core instructions
132132
message("CUDA Toolkit Version: ${CUDAToolkit_VERSION}")
133-
if(CUDAToolkit_VERSION VERSION_GREATER 12)
133+
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 13)
134+
add_compile_definitions(GGML_CUDA_USE_GRAPHS) #try enable cuda graphs on cu12 build
135+
set(CMAKE_CUDA_ARCHITECTURES "75-virtual;80-virtual;86-virtual") # lowest CUDA 13 standard
136+
elseif(CUDAToolkit_VERSION VERSION_GREATER 12)
134137
add_compile_definitions(GGML_CUDA_USE_GRAPHS) #try enable cuda graphs on cu12 build
135138
set(CMAKE_CUDA_ARCHITECTURES "50-virtual;61-virtual;70-virtual;75-virtual;80-virtual") # lowest CUDA 12 standard + lowest for integer intrinsics
136139
else()

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,12 @@ NVCCFLAGS += -Wno-deprecated-gpu-targets \
231231
-gencode arch=compute_75,code=compute_75 \
232232
-gencode arch=compute_80,code=compute_80
233233

234+
else ifdef LLAMA_ARCHES_CU13
235+
NVCCFLAGS += -Wno-deprecated-gpu-targets \
236+
-gencode arch=compute_75,code=compute_75 \
237+
-gencode arch=compute_80,code=compute_80 \
238+
-gencode arch=compute_86,code=compute_86
239+
234240
else
235241
NVCCFLAGS += -Wno-deprecated-gpu-targets -arch=all
236242
endif

koboldcpp.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ fi
3939
if [ -n "$ARCHES_CU12" ]; then
4040
ARCHES_FLAG="LLAMA_ARCHES_CU12=1"
4141
fi
42+
if [ -n "$ARCHES_CU13" ]; then
43+
ARCHES_FLAG="LLAMA_ARCHES_CU13=1"
44+
fi
4245
if [ -n "$NO_WMMA" ]; then
4346
NO_WMMA_FLAG="LLAMA_NO_WMMA=1"
4447
fi

0 commit comments

Comments
 (0)