Skip to content

Fix mamba installation on AMD GPUs: clang++: error: cannot determine amdgcn architecture: /opt/rocm/lib/llvm/bin/amdgpu-arch: ; consider passing it via '--offload-arch' #717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rodosingh opened this issue Apr 3, 2025 · 0 comments

Comments

@rodosingh
Copy link

Hi Folks (especially AMD GPUs' trainer),

While installing/building mamba-ssm from repository, if you have faced issues with cannot determine amdgcn architecture and the solution suggested being consider passing it via '--offload-arch'. Then here is the solution.

[NOTE]: This have been tried with the rocm/pytorch-training docker image.

First of all, try to checkout to a particular commit of mamba repo to avoid possible errors like NameError: name 'bare_metal_version' is not defined and then export a variable that overrides the possibility of setting --offload_arch=native as done in setup.py of mamba repo.

Steps:

git clone https://github.com/state-spaces/mamba.git mamba_ssm
cd mamba_ssm
git checkout 014c094
export HIP_ARCHITECTURES="gfx942" # For MI300 only. Replace it with your architecture(s)
pip install --no-cache-dir --verbose .

I tried searching for the HIP_ARCHITECTURES variable by loading docker image and os.getenv(), but couldn't find any.

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

No branches or pull requests

1 participant