Commits


Tianlei Wu authored and GitHub committed 444606d7eb0
Add extra requires for cuda/cudnn DLLs to onnxruntime-gpu python package (#23659) ### Description Add extra requires for cuda/cudnn DLLs to onnxruntime-gpu python package. During building wheel, make sure to add cuda version parameters to build command line like `--cuda_version 12.8`. Note that we only add extra requires for cuda 12 for now. If a package is built with cuda 11, no extra requires will be added. Examples to install extra DLLs from wheel: ``` pip install onnxruntime_gpu-1.21.0-cp310-cp310-linux_x86_64.whl[cuda,cudnn] ``` If install cudnn DLLs but not cuda DLLs: ``` pip install onnxruntime_gpu-1.21.0-cp310-cp310-linux_x86_64.whl[cudnn] ``` Example section in METADATA file of dist-info: ``` Provides-Extra: cuda Requires-Dist: nvidia-cuda-nvrtc-cu12~=12.0; extra == "cuda" Requires-Dist: nvidia-cuda-runtime-cu12~=12.0; extra == "cuda" Requires-Dist: nvidia-cufft-cu12~=11.0; extra == "cuda" Requires-Dist: nvidia-curand-cu12~=10.0; extra == "cuda" Provides-Extra: cudnn Requires-Dist: nvidia-cudnn-cu12~=9.0; extra == "cudnn" ... ``` ### Motivation and Context Jian had a PR: https://github.com/microsoft/onnxruntime/pull/22506. This adds only part of the change. Extra change include updating the windows gpu python packaging pipeline to pass cuda version to the build command line. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>