Conversation
252d8cd to
e9e7c45
Compare
e9e7c45 to
6090345
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #380 +/- ##
==========================================
+ Coverage 63.10% 63.44% +0.34%
==========================================
Files 33 33
Lines 3697 3699 +2
==========================================
+ Hits 2333 2347 +14
+ Misses 1364 1352 -12
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same class of bug as #379 (AMD ROCm fix), but for NVIDIA on Windows and Linux.
The NVIDIA pip path used --extra-index-url for all CUDA versions on Windows. When the CUDA index has an older torch than PyPI (cu118 tops at 2.7.1, cu121 at 2.5.1, cu124 at 2.6.0), pip picks PyPI's 2.10.0 which is CPU-only on Windows. Users selecting --nvidia --cuda-version 12.4 on Windows silently get a CPU torch.
On Linux, the NVIDIA path had no index flag at all — it just used plain PyPI. This meant --cuda-version was completely ignored.
The fix changes --extra-index-url to --index-url and makes the NVIDIA block platform-agnostic (same approach as the AMD fix in #379). The 5 repetitive elif blocks are collapsed into a single block that computes the CUDA tag dynamically from the --cuda-version enum value.
Additionally, the --fast-deps / uv path (DependencyCompiler) had hardcoded cu126 and rocm6.3 — it ignored both --cuda-version and --rocm-version. This PR adds cuda_version and rocm_version optional parameters to DependencyCompiler.init and passes them through from execute().
Verified with real pip --dry-run and real uv pip compile against all 10 index URLs (5 CUDA + 5 ROCm). All resolve to the correct GPU-specific torch. Confirmed the old --extra-index-url behavior was broken for cu118, cu121, cu124, rocm6.1, rocm6.2, rocm6.3 (PyPI's CPU torch won in all cases).
Relates to #289.