-
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 12 and session.get_providers() not showing CUDAExecutionProvider #21354
Comments
The installation command looks wrong. Please uninstall the package then use the following commands:
Should be "--index-url" instead of "--extra-index-url". We will update the doc shortly. |
Currently colab uses torch 2.3.0+cu121 by default, which requires nvidia-cudnn-cu12==8.9.2.26 while onnxruntime-gpu 1.18.1 for cuda 12 requires cudnn 9. You can setup colab like the following: Choice 1: torch nightly 2.5.0 and onnxruntime-gpu 1.18.1 for cuda 12 and cudnn 9
See example colab job for this combination. Choice 2: torch 2.3.1+cu121 and onnxruntime-gpu 1.18.0 for cuda 12 and cudnn 8.
See example colab job for this combination. Choice 3: torch 2.3.1+cu118 and onnxruntime-gpu 1.18.1 for cuda 11.8 and cudnn 8.
See example colab job for this combination. |
Hi @snnn , I am attempting to do the following commands via a Dockerfile on a Jetson Xavier Orin. However, I run into the error: "no matching distribution found for onnxruntime-gpu". If you have any advice for me, I would greatly appreciate it. On my normal computer - I get the following error when I try to access the link: 401 - Uh-oh, you do not have access. |
@huzaifahshamim, for Jetson, you can download onnxruntim-gpu wheel in https://elinux.org/Jetson_Zoo for JetPack 6.0 (CUDA 12 and cuDNN 8.9). |
I also added two notebooks that use onnxruntime-gpu without importing pytorch: CUDA 11: CUDA 12: Installation:
Then you can run inference like:
The key here is to preload nvidia DLLs from python package (so that you need not depend on cuda or cudnn installed in system.) |
Hi @tianleiwu, thank you for your reply. So that is how I was initially attempting to download it onto my Docker container on Orin. I tried both onnxruntime 1.17 and 1.18 with python 3.10 but was running into errors that there was no .so.11 for libcublasLt, libcublas and other CUDA libraries. Which wheel should I use? |
In my opinion it should be easier to use the most popular inference library (onnxruntime) in the most popular dev tool (Colab). |
@huzaifahshamim, |
See https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements for cuda 12 requirement. Note that the coming PyTorch 2.4 will support cuDNN 9.x, so that will help. Example colab notebooks (ORT 1.18.1 +Torch 2.4, ORT 1.18.1 only) are provided. This issue is closed. Feel free to create new issue if it is not related to colab. |
I confirm that upgrading to Pytorch 2.4, it uses Cuda inference. |
Describe the documentation issue
I installed onnxruntime in Colab having T4 gpu and Cuda 12, using the commands the guide:
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
When I run command:
onnxruntime.get_device()
I get GPU
But when I run command:
session = onnxruntime.InferenceSession(model_path, providers=['CUDAExecutionProvider', 'CPUExecutionProvider']) session.get_providers()
I get CPUExecutionProvider
In fact inference doesn't use GPU memory. Why? Should I ran any other steps?
Thanks
Page / URL
https://onnxruntime.ai/docs/install/#install-onnx-runtime-gpu-cuda-12x
The text was updated successfully, but these errors were encountered: