-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUDA does not load on Windows #22000
Comments
What's your PyTorch version? Try install latest PyTorch for cuda 12 (older version of PyTorch uses cudnn 8, which will not work properly with latest onnxruntime-gpu). If you install other onnxruntime packages (like onnxruntime or onnxruntime-directml), you might uninstall them first. Need add cuda and cudnn bin directories to PATH environment variable. Example is like
Recommend the following combination:
If you cannot find the root cause, try Dependency Walker to open the DLL (You can use |
I was testing with latest torch. I'll check this combination sholrtly, but why is PyTorch necessary in the combination you listed Is that required my onmx runtime? |
PyTorch is not required to run onnxruntime. |
Understood. I was not using them in the same process. I set up a second virtual env for verification of the CUDA/CUDNN installs. |
I installed latest nvidia drivers, CUDA 12.6, and CUDNN 9.4 (I also had CUDNN 8.x installed at some point too). I noticed that the PATH set by NVIDIA's installer was using |
That's good finding. When I installed cudnn 9.4 with setup file, the DLLs are in I usually use the tarball (zip file) to install cuDNN, which does not have such issue. |
Describe the issue
I want to preface that ONNX runtime + CUDA provider works fine on Ubuntu 22.04. However, the same machine booted into windows results in the following error (while PyTorch works):
I have CUDA, CUDNN, and zlib installed and in path. MSVC runtime is also installed.
This was a clean windows install.
I think there's some dependency missing from the documentation.
To reproduce
Follow the onnxruntime-gpu instructions for windows. Try to load the CUDA provider.
Urgency
No response
Platform
Windows
OS Version
11
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.19.2 or 1.18.1
ONNX Runtime API
Python
Architecture
X64
Execution Provider
CUDA
Execution Provider Library Version
CUDA 12.4, CUDA 12.6, CUDA 11.8
The text was updated successfully, but these errors were encountered: