amd: stop reporting the bitsandbytes PyPI fallback as broken
This commit is contained in:
parent
8a3d1f7bb3
commit
75c89eaeb5
3 changed files with 17 additions and 4 deletions
|
|
@ -263,6 +263,7 @@ run_install_cmd_retry() {
|
|||
# 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.
|
||||
_BNB_ROCM_PYPI_FALLBACK="bitsandbytes>=0.50.0"
|
||||
_install_bnb_rocm() {
|
||||
_label="$1"
|
||||
_venv_py="$2"
|
||||
|
|
@ -304,10 +305,10 @@ _install_bnb_rocm() {
|
|||
fi
|
||||
rm -f "$_bnb_log"
|
||||
step "warning" "$_label (pre-release) failed (exit code $_bnb_rc)" "$C_WARN" >&2
|
||||
substep "[WARN] bnb pre-release install failed; falling back to PyPI (4-bit decode broken on ROCm)" "$C_WARN"
|
||||
substep "[WARN] bnb pre-release install failed; falling back to PyPI $_BNB_ROCM_PYPI_FALLBACK, which carries the ROCm 4-bit fix" "$C_WARN"
|
||||
fi
|
||||
run_install_cmd "$_label (pypi fallback)" "$_venv_py" -m pip install \
|
||||
--force-reinstall --no-cache-dir --no-deps "bitsandbytes>=0.50.0"
|
||||
--force-reinstall --no-cache-dir --no-deps "$_BNB_ROCM_PYPI_FALLBACK"
|
||||
}
|
||||
|
||||
if [ "$_next_is_package" = true ]; then
|
||||
|
|
|
|||
|
|
@ -2025,7 +2025,7 @@ def _ensure_rocm_torch() -> None:
|
|||
print(
|
||||
_red(
|
||||
" bnb pre-release install failed; falling back to PyPI "
|
||||
"(4-bit decode will be broken on ROCm)"
|
||||
f"{_BNB_ROCM_PYPI_FALLBACK}, which carries the ROCm 4-bit fix"
|
||||
)
|
||||
)
|
||||
if not _bnb_installed:
|
||||
|
|
|
|||
|
|
@ -833,7 +833,7 @@ class TestAmdBnbFloorParity:
|
|||
def test_install_sh_pypi_fallback_floor(self):
|
||||
text = INSTALL_SH.read_text(encoding = "utf-8")
|
||||
assert (
|
||||
f'"bitsandbytes>={self.FLOOR}"' in text
|
||||
f'_BNB_ROCM_PYPI_FALLBACK="bitsandbytes>={self.FLOOR}"' in text
|
||||
), f"install.sh _install_bnb_rocm PyPI fallback must floor at {self.FLOOR}"
|
||||
|
||||
def test_stack_py_pypi_fallback_floor(self):
|
||||
|
|
@ -864,3 +864,15 @@ class TestAmdBnbFloorParity:
|
|||
raise AssertionError(
|
||||
f"{path.name} still floors bitsandbytes in the broken ROCm range: {line.strip()!r}"
|
||||
)
|
||||
|
||||
def test_fallback_is_not_reported_as_broken(self):
|
||||
"""The fallback now installs the first fixed release, so neither installer may
|
||||
still tell the user it leaves 4-bit decode broken on ROCm."""
|
||||
for path in (INSTALL_SH, STACK_PY):
|
||||
text = path.read_text(encoding = "utf-8")
|
||||
assert (
|
||||
"4-bit decode broken on ROCm" not in text
|
||||
), f"{path.name} still reports the repaired PyPI fallback as broken"
|
||||
assert (
|
||||
"4-bit decode will be broken on ROCm" not in text
|
||||
), f"{path.name} still reports the repaired PyPI fallback as broken"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue