From: Johannes Gäßler Date: Tue, 26 Aug 2025 14:01:20 +0000 (+0200) Subject: CUDA: return -1 for nonexistent compiled arch (llama/15587) X-Git-Tag: v0.9.1~145 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=ba765b1d56e23b0de0924e2a5655ca18930e54de;p=pkg%2Fggml%2Fsources%2Fggml CUDA: return -1 for nonexistent compiled arch (llama/15587) --- diff --git a/src/ggml-cuda/common.cuh b/src/ggml-cuda/common.cuh index 48de1649..85bc9e93 100644 --- a/src/ggml-cuda/common.cuh +++ b/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; }