onnxruntime
fe0cc8ce - Remove some usages of CUDA_VERSION macro (#16199)

Commit
3 years ago
Remove some usages of CUDA_VERSION macro (#16199) ### Description We should avoid using the macro since the value of the macro is inaccurate. For example, our prebuilt packages are built with CUDA 11.8 but people may run the binaries with CUDA 11.4. (The minimal CUDA version we support is CUDA 11.4) A runtime function should be used to determine CUDA version. Like: ```C++ int cuda_runtime_version = 0; CUDA_CALL_THROW(cudaRuntimeGetVersion(&cuda_runtime_version)); ORT_ENFORCE(cuda_runtime_version >= 11040, "ONNX Runtime needs cuda runtime higher than 11.4"); ```
Author
Changming Sun
Parents
Loading