From b4182a8d50f0fc9fdba27ef86d9f3db0c8a15f5f Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Tue, 6 Oct 2026 13:11:38 +0200 Subject: [PATCH] vmm: fall back to cudaGetDriverEntryPoint below CUDA 12.5 (#1071) cudaGetDriverEntryPointByVersion arrived in CUDA 12.5; the CUDA 12.2-12.4 engine build stopped in vmm.cpp. Same fallback expert_cache.cpp already carries, and the sticky error of a failed lookup is cleared. Co-authored-by: zhouxihong1 --- src/core/vmm.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/vmm.cpp b/src/core/vmm.cpp index 9ada955d..e69d2b88 100644 --- a/src/core/vmm.cpp +++ b/src/core/vmm.cpp @@ -25,9 +25,15 @@ struct Api { template bool resolve(const char* name, F& f) { cudaDriverEntryPointQueryResult q{}; void* p = nullptr; - if (cudaGetDriverEntryPointByVersion(name, &p, 12000, cudaEnableDefault, &q) != cudaSuccess || - q != cudaDriverEntryPointSuccess || p == nullptr) +#if CUDART_VERSION >= 12050 + const cudaError_t e = cudaGetDriverEntryPointByVersion(name, &p, 12000, cudaEnableDefault, &q); +#else // the versioned query arrived in CUDA 12.5 + const cudaError_t e = cudaGetDriverEntryPoint(name, &p, cudaEnableDefault, &q); +#endif + if (e != cudaSuccess || q != cudaDriverEntryPointSuccess || p == nullptr) { + (void) cudaGetLastError(); return false; + } f = (F) p; return true; }