Repository navigation
pip: raise the AMD installer bitsandbytes fallback floors to 0.50.0 - #7581
danielhanchen wants to merge 8 commits into
Conversation
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aff62c8591
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| _BNB_ROCM_PYPI_FALLBACK = "bitsandbytes>=0.49.1" | ||
| # First PyPI release carrying bnb #1887. Keep in step with the install.sh | ||
| # fallback (and the amd extra, once it lands here). | ||
| _BNB_ROCM_PYPI_FALLBACK = "bitsandbytes>=0.50.0" |
There was a problem hiding this comment.
Try the PyPI bnb fallback on Windows ROCm
For Windows AMD installs where the GitHub continuous-release wheel is blocked, this new fallback floor is never reached: _ensure_rocm_torch() handles IS_WINDOWS earlier and returns after _install_bnb_windows_rocm(), whose failure path only warns. That leaves the PowerShell flows with ROCm torch but no working bitsandbytes instead of trying the now-fixed bitsandbytes>=0.50.0 fallback; please wire this fallback into the Windows failure path too.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Correct, and fixed in 0f3833e (and on main in #7535 as b56b5f5). The Windows branch of _ensure_rocm_torch() returns right after _install_bnb_windows_rocm(), whose failure path only printed a warning, so a blocked GitHub URL left Windows ROCm with ROCm torch and no usable bitsandbytes.
Worth noting why this could not be wired up before: the two comments at those call sites said the PyPI wheel ships only CUDA DLLs and fails on ROCm, which was true and is why there was no fallback. Raising the floor to 0.50.0 is what makes the fallback viable, so those comments were stale in the same way the earlier warning strings were. Verified against the artifact rather than the release notes: bitsandbytes-0.50.0-py3-none-win_amd64.whl contains libbitsandbytes_rocm714.dll and libbitsandbytes_rocm72.dll alongside the CUDA ones.
_install_bnb_windows_rocm() now tries the pre-release wheel, falls back to _BNB_ROCM_PYPI_FALLBACK, and only returns False when both fail. The BNB_ROCM_VERSION DLL-suffix detection and the hipInfo.exe PATH fix-up still run afterwards, so the fallback wheel gets the same handling as the pre-release one; that mattered, since the PyPI wheel ships rocm714/rocm72 and bnb's HIP auto-detect can mismatch either.
Tests: test_no_op_when_win_amd64_url_missing asserted the old no-fallback behaviour and is now wrong, so it is replaced by test_falls_back_to_pypi_when_win_amd64_url_missing, plus test_falls_back_to_pypi_when_prerelease_install_fails and test_returns_false_only_when_both_paths_fail. Full run: 519 passed, 2 skipped across test_rocm_support.py, test_pr5940_followups.py, test_cross_platform_parity.py and test_install_python_stack.py.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Closing as already landed, not as rejected: every change here is on Checked each distinctive addition against The branch is 64 commits behind On the red check:
|
What
Raise the two AMD ROCm bitsandbytes PyPI fallback floors on the
pipbranch from>=0.49.1to>=0.50.0, and add a regression test that locks them there.install.sh_install_bnb_rocm, the PyPI fallback used when the continuous-release_main wheel URL is unreachable_BNB_ROCM_PYPI_FALLBACKinstudio/install_python_stack.py, which is the path Studio and both PowerShell installers use (install.ps1andstudio/setup.ps1carry no bitsandbytes spec of their own, they delegate to the stack script)Why
bitsandbytes <= 0.49.2 NaNs at decode shape on every AMD GPU. The ROCm 4-bit GEMV fix is bnb #1887, merged 2026-03-09, after 0.49.2 (2026-02-16) and before 0.50.0 (2026-07-24), so 0.50.0 is the first PyPI release that carries it. Both fallbacks still allowed the broken range, which is the one thing they exist to prevent: they fire precisely when the pre-release URL cannot be reached, and a host that cannot reach GitHub is also the host most likely to be sitting behind a lagging PyPI mirror that still offers 0.49.x as its newest.
The floor is real rather than nominal. The PyPI 0.50.0
manylinux_2_24_x86_64wheel shipslibbitsandbytes_rocm{64,70,71,714,72}.soand thewin_amd64wheel shipslibbitsandbytes_rocm{714,72}.dll, the same ROCm set as the continuous-release wheel, so the fallback lands on a bitsandbytes that actually has ROCm kernels.This is the
pipbranch counterpart to the same change onmain(#7535), so the two branches do not drift.Test
TestAmdBnbFloorParityintests/python/test_cross_platform_parity.pyasserts both installer floors, and that no installer orpyproject.tomlline floors bitsandbytes in the 0.49.x range. Theamdextra does not exist on this branch yet (#7278 adds it), so the extra assertion skips until it lands and then holds it to the same floor.Not changed
The continuous-release_main pre-release wheel stays first in line. Its ROCm binary coverage is identical to 0.50.0 today, so it could be dropped, but that would delete the
force_pipandBNB_ROCM_VERSIONplumbing built around it and rewrite the tests that cover it. Separate change if wanted.The comments claiming the pre-release wheel's embedded metadata version is
0.50.0.dev0were stale; the rolling artifact now reports0.50.1.dev0, so they now say0.50.x.dev0.