]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
CUDA: return -1 for nonexistent compiled arch (llama/15587)
authorJohannes Gäßler <redacted>
Tue, 26 Aug 2025 14:01:20 +0000 (16:01 +0200)
committerGeorgi Gerganov <redacted>
Fri, 5 Sep 2025 09:54:05 +0000 (12:54 +0300)
src/ggml-cuda/common.cuh

index 48de1649cf5fd941c80cf886d90bfac0012baf61..85bc9e933bca541dda0cb3dcb866c264b1685632 100644 (file)
@@ -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;
 }