Skip to content

better install: streamline GPU detection and pip configuration#28

Open
Apophis3158 wants to merge 2 commits into
patientx-cfz:masterfrom
Apophis3158:cfui-rocm/bnb
Open

better install: streamline GPU detection and pip configuration#28
Apophis3158 wants to merge 2 commits into
patientx-cfz:masterfrom
Apophis3158:cfui-rocm/bnb

Conversation

@Apophis3158
Copy link
Copy Markdown

@Apophis3158 Apophis3158 commented Apr 14, 2026

I tried install.bat and found some issues:

Necessary

In TheRock/pytorch/README it says

With passing builds we upload torch, torchvision, torchaudio, triton, and apex wheels to subfolders of the "v2-staging" directory in the nightly release s3 bucket with a public URL at https://rocm.nightlies.amd.com/v2-staging/

Only with passing Torch tests we promote passed wheels to the "v2" directory in the nightly release s3 bucket with a public URL at https://rocm.nightlies.amd.com/v2/

So /v2 is tests passed stabled releases and /v2-staging should not be used.

Run pip install rocm[devel,libraries] first will always install the latest build like rocm-sdk 7.13.0a20260414, but then run pip install torch might only get torch 7.13.0a20260409, this will uninstall the rocm-sdk 7.13.0a20260414 you just installed and install rocm-sdk 7.13.0a20260409 instead.

  • Fix: Run pip install torch torchaudio torchvision first, it will auto collect needed rocm-sdk core and libraries, then run pip install rocm[devel,libraries] will add the matching devel

When installation failed, the script prints Check the error messages above for details. but there was no error message.

  • Fix: Remove several unnecessary >nul 2>&1

echo ! won't print because of setlocal enabledelayedexpansion set.

  • Fix: use echo ^^! instead.

User might have set PIP_REQUIRE_VIRTUALENV=true for safety, and block script running,

  • Fix: set "PIP_REQUIRE_VIRTUALENV=false" in script.

QOL

- Centralize GPU arch→URL mapping in detect_gpu.py (arch_index_suffix)
- Add PIP env vars (REQUIRE_VIRTUALENV, NO_WARN_SCRIPT_LOCATION, QUIET)
- Fix echo [!] escaping for enabledelayedexpansion ([^^!])
- Remove redundant >nul 2>&1 from pip commands for better error visibility
- Update bitsandbytes wheel URL to official continuous-release
- Add python_env/ to .gitignore
@Apophis3158
Copy link
Copy Markdown
Author

Run pip install torch first also fix another issue: If the user has set up a PIP mirror index, pip install rocm[devel,libraries] might only get a initial version rocm-0.1.0.tar.gz from mirror, because rocm-7.13.0a20260415.tar.gz requires --pre.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant