Skip to content

Allow ROCm arch override#1896

Open
ailuntz wants to merge 1 commit intobitsandbytes-foundation:mainfrom
ailuntz:fix/rocm-arch-override
Open

Allow ROCm arch override#1896
ailuntz wants to merge 1 commit intobitsandbytes-foundation:mainfrom
ailuntz:fix/rocm-arch-override

Conversation

@ailuntz
Copy link

@ailuntz ailuntz commented Mar 10, 2026

Fixes #1444.\n\nSupport BNB_ROCM_GPU_ARCH override when rocminfo is unavailable.

@Abdennacer-Badaoui
Copy link
Member

Thanks @ailuntz.
A few things need adjustment: First, the override should be a fallback after rocminfo fails, not a priority override that runs before it; for most users, auto-detection is more reliable and shouldn't be bypassed. Second, use only BNB_ROCM_GPU_ARCH and drop BNB_ROCM_ARCH, that name is already used as a CMake build-time variable and reusing it at runtime with different semantics is confusing. Third, add some basic validation on the value (e.g. check it matches gfx[a-zA-Z0-9]+) so garbage input doesn't silently propagate. And finally, the existing error message should mention BNB_ROCM_GPU_ARCH as a workaround so users know what to do when rocminfo fails (ask users to install rocminfo, if it's not possible then ask them to set the env variable)

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.

No access to rocminfo in a production environment - ability to manually set GPU arch.

2 participants