Commit 24a887e
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: #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>1 parent 550c046 commit 24a887e
File tree
3 files changed
+43
-3
lines changed- tools/ci_build
- github/azure-pipelines/stages
3 files changed
+43
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
721 | 724 | | |
722 | 725 | | |
723 | 726 | | |
724 | | - | |
725 | 727 | | |
726 | 728 | | |
727 | 729 | | |
| |||
754 | 756 | | |
755 | 757 | | |
756 | 758 | | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
757 | 773 | | |
758 | 774 | | |
759 | 775 | | |
| |||
771 | 787 | | |
772 | 788 | | |
773 | 789 | | |
| 790 | + | |
774 | 791 | | |
775 | 792 | | |
776 | 793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2366 | 2366 | | |
2367 | 2367 | | |
2368 | 2368 | | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
2369 | 2389 | | |
2370 | 2390 | | |
2371 | 2391 | | |
2372 | 2392 | | |
2373 | 2393 | | |
| 2394 | + | |
2374 | 2395 | | |
2375 | 2396 | | |
2376 | 2397 | | |
| |||
2418 | 2439 | | |
2419 | 2440 | | |
2420 | 2441 | | |
| 2442 | + | |
2421 | 2443 | | |
2422 | 2444 | | |
2423 | 2445 | | |
| |||
3075 | 3097 | | |
3076 | 3098 | | |
3077 | 3099 | | |
| 3100 | + | |
3078 | 3101 | | |
3079 | 3102 | | |
3080 | 3103 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
0 commit comments