From: Johannes Gäßler Date: Tue, 26 Aug 2025 14:01:20 +0000 (+0200) Subject: CUDA: return -1 for nonexistent compiled arch (#15587) X-Git-Tag: upstream/0.0.6527~240 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=8f5afa94c4f929da71f560db7c9f38ef6a783d95;p=pkg%2Fggml%2Fsources%2Fllama.cpp CUDA: return -1 for nonexistent compiled arch (#15587) --- diff --git a/ggml/src/ggml-cuda/common.cuh b/ggml/src/ggml-cuda/common.cuh index 48de1649..85bc9e93 100644 --- a/ggml/src/ggml-cuda/common.cuh +++ b/ggml/src/ggml-cuda/common.cuh @@ -107,9 +107,9 @@ constexpr bool ggml_cuda_has_arch(const int arch) { return ggml_cuda_has_arch_impl(arch, __CUDA_ARCH_LIST__); } -constexpr int ggml_cuda_highest_compiled_arch_impl(const int arch, const int cur) { +constexpr int ggml_cuda_highest_compiled_arch_impl(const int /*arch*/, const int cur) { if (cur == 0) { - GGML_ABORT("ggml was not compiled with any CUDA arch <= %d", arch); + return -1; } return cur; }