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 <zhouxihong1@users.noreply.github.com>
This commit is contained in:
1 parent
f236dbb85c
commit
b4182a8d50
1 file changed
+8
-2
+8
-2
@@ -25,9 +25,15 @@ struct Api {
|
||||
template <class F> 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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user