File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff 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 ()
Original file line number Diff line number Diff 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+
234240else
235241NVCCFLAGS += -Wno-deprecated-gpu-targets -arch=all
236242endif
Original file line number Diff line number Diff line change 3939if [ -n " $ARCHES_CU12 " ]; then
4040 ARCHES_FLAG=" LLAMA_ARCHES_CU12=1"
4141fi
42+ if [ -n " $ARCHES_CU13 " ]; then
43+ ARCHES_FLAG=" LLAMA_ARCHES_CU13=1"
44+ fi
4245if [ -n " $NO_WMMA " ]; then
4346 NO_WMMA_FLAG=" LLAMA_NO_WMMA=1"
4447fi
You can’t perform that action at this time.
0 commit comments