Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
Detect too-old cuda driver
Daniel Hiltgen10ed1b6292d5
diff --git a/gpu/gpu_info_cudart.c b/gpu/gpu_info_cudart.cindex 9f69f845d..ef13f5c0f 100644--- a/gpu/gpu_info_cudart.c+++ b/gpu/gpu_info_cudart.c@@ -62,6 +62,10 @@ void cudart_init(char *cudart_lib_path, cudart_init_resp_t *resp) {LOG(resp->ch.verbose, "cudaSetDevice err: %d\n", ret);UNLOAD_LIBRARY(resp->ch.handle);resp->ch.handle = NULL;+ if (ret == CUDA_ERROR_INSUFFICIENT_DRIVER) {+ resp->err = strdup("your nvidia driver is too old or missing, please upgrade to run ollama");+ return;+ }snprintf(buf, buflen, "cudart init failure: %d", ret);resp->err = strdup(buf);return;diff --git a/gpu/gpu_info_cudart.h b/gpu/gpu_info_cudart.hindex 476e75557..492704a83 100644--- a/gpu/gpu_info_cudart.h+++ b/gpu/gpu_info_cudart.h@@ -7,6 +7,7 @@typedef enum cudartReturn_enum {CUDART_SUCCESS = 0,CUDART_UNSUPPORTED = 1,+ CUDA_ERROR_INSUFFICIENT_DRIVER = 35,// Other values omitted for now...} cudartReturn_t;