amd: tighten the bitsandbytes ROCm fallback comments

This commit is contained in:
Daniel Han 2026-07-28 22:47:53 +00:00
commit e2a4690899
2 changed files with 8 additions and 14 deletions

View file

@ -257,12 +257,9 @@ run_install_cmd_retry() {
done
}
# Install bitsandbytes on AMD ROCm hosts. Uses the continuous-release_main
# wheel for the ROCm 4-bit GEMV fix (bnb PR #1887, post-0.49.2); bnb <= 0.49.2
# NaNs at decode shape on every AMD GPU. Falls back to PyPI >=0.50.0 if the
# pre-release URL is unreachable: 0.50.0 (2026-07-24) is the first PyPI release
# carrying that fix, and its manylinux x86_64 wheel ships the same
# libbitsandbytes_rocm{64,70,71,714,72}.so set as the pre-release.
# Install bitsandbytes on AMD ROCm hosts. bnb <= 0.49.2 NaNs at 4-bit decode
# shape on every AMD GPU; the fix (bnb #1887) is in the continuous-release_main
# wheel used below and first ships on PyPI in 0.50.0, hence the fallback floor.
_BNB_ROCM_PYPI_FALLBACK="bitsandbytes>=0.50.0"
_install_bnb_rocm() {
_label="$1"
@ -278,10 +275,8 @@ _install_bnb_rocm() {
_bnb_whl_url=""
;;
esac
# uv rejects the continuous-release_main bitsandbytes wheel because the
# filename version (1.33.7rc0) does not match the embedded metadata version
# (0.50.x.dev0, whatever main is at). pip accepts the mismatch, so bootstrap
# pip and use it.
# uv rejects the pre-release wheel: its filename version (1.33.7rc0) does not
# match its metadata version (0.50.x.dev0). pip accepts it, so bootstrap pip.
if ! "$_venv_py" -m pip --version >/dev/null 2>&1; then
if ! run_maybe_quiet "$_venv_py" -m ensurepip --upgrade; then
run_maybe_quiet uv pip install --python "$_venv_py" pip || \

View file

@ -389,9 +389,7 @@ _GFX_TO_AMD_INDEX_ARCH: dict[str, str] = {
}
# bitsandbytes continuous-release_main wheels with the ROCm 4-bit GEMV fix
# (bnb PR #1887, post-0.49.2). bnb <= 0.49.2 NaNs at decode shape on every
# AMD GPU. PyPI 0.50.0 (2026-07-24) is the first release carrying that fix, so
# _BNB_ROCM_PYPI_FALLBACK below is a safe floor when these URLs are unreachable.
# (bnb #1887). bnb <= 0.49.2 NaNs at 4-bit decode shape on every AMD GPU.
_BNB_ROCM_PRERELEASE_URLS: dict[str, str] = {
"x86_64": (
"https://github.com/bitsandbytes-foundation/bitsandbytes/releases/"
@ -412,7 +410,8 @@ _BNB_ROCM_PRERELEASE_URLS: dict[str, str] = {
"bitsandbytes-1.33.7.preview-py3-none-win_amd64.whl"
),
}
# Keep in step with the install.sh fallback (and the amd extra, once it lands here).
# 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"