From 25b086866562362e63ba5e3742a29a4966fd2980 Mon Sep 17 00:00:00 2001 From: bobqianic <129547291+bobqianic@users.noreply.github.com> Date: Thu, 21 Dec 2023 13:44:04 +0000 Subject: [PATCH] cmake : set default CUDA architectures (#1667) --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03e6bd01c2a..b6bbc044fc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -521,7 +521,13 @@ endif() if (GGML_SOURCES_CUDA) message(STATUS "GGML CUDA sources found, configuring CUDA architecture") - set_property(TARGET whisper PROPERTY CUDA_ARCHITECTURES OFF) + # Only configure gmml CUDA architectures is not globally set + if (NOT DEFINED GGML_CUDA_ARCHITECTURES) + # Not overriden by user, so set defaults + set(GGML_CUDA_ARCHITECTURES 52 61 70) + endif() + message(STATUS "GGML Configuring CUDA architectures ${GGML_CUDA_ARCHITECTURES}") + set_property(TARGET whisper PROPERTY CUDA_ARCHITECTURES ${GGML_CUDA_ARCHITECTURES}) set_property(TARGET whisper PROPERTY CUDA_SELECT_NVCC_ARCH_FLAGS "Auto") endif()