CUDA: return -1 for nonexistent compiled arch (#15587)

This commit is contained in:
Johannes Gäßler
2025-08-26 16:01:20 +02:00
committed by GitHub
parent b3964c1e89
commit 8f5afa94c4

View 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;
}