-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Describe the feature request
Short Description
Enable the usage of CUDA DLLs installed via pip from the NVIDIA Python index or include the CUDA DLLs in the onnxruntime-gpu wheel when installing with pip install onnxruntime-gpu[cuda_dlls].
Problem
Installing CUDA DLLs for onnxruntime-gpu currently involves limitations such as:
- Mandatory user account creation on the NVIDIA website.
- Dependency on admin rights, restricting installation on machines without such privileges.
- Risk of installing incompatible CUDA versions.
- Inconvenience of updating
CUDA_PATHwhen switching Python environments with different CUDA versions.
In contrast, PyTorch on Windows includes CUDA DLLs in its wheels, simplifying the installation process and reducing version mismatch risks. On Linux, PyTorch seems to use NVIDIA packages from the feed https://pypi.ngc.nvidia.com (installable with pip install nvidia-pyindex) (I did not double check this).
Possible Solutions
To streamline the installation process for onnxruntime-gpu, the following solutions could be considered:
-
Packaged CUDA DLLs with onnxruntime-gpu Wheels:
- Create onnxruntime-gpu wheels that include CUDA DLLs, allowing users to install them conveniently with
pip install onnxruntime-gpu[cuda_dlls].
- Create onnxruntime-gpu wheels that include CUDA DLLs, allowing users to install them conveniently with
-
Dependency Configuration via onnxruntime-gpu Wheel:
- Create an onnxruntime-gpu wheel installable with
pip install onnxruntime-gpu[cuda_dlls]. - This wheel would list packages from the NVIDIA package index as install dependencies (e.g.,
nvidia-cudnn-cu12), which can be installed withpip install nvidia-pyindexfollowed bypip install nvidia-cudnn-cu12. - Configure onnxruntime to utilize these DLLs instead of those in
CUDA_PATH.
- Create an onnxruntime-gpu wheel installable with
The second solution may facilitate reuse of the same CUDA DLLs by other packages like CuPy or PyTorch, potentially reducing the overall size of the Python environment.
Describe scenario use case
- allow full automation of the the cuda dlls installation
- allow the use different cuda dlls versions in different python environment with editing CUDA_PATH