Skip to content
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

ROCm: Allow setting compilation target #2581

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Conversation

rlrs
Copy link
Contributor

@rlrs rlrs commented Jan 24, 2024

Currently, building the package requires a machine that has a GPU with the desired architecture. This is however not necessary, you can easily compile for another target, even if the build machine has no GPU at all.
This PR simply enables one to set the GPU_ARCHS environment variable, for example as GPU_ARCHS=gfx90a or GPU_ARCHS=gfx90a;gfx1100` if you want to build for multiple targets.
This resolves #2127.

@WoosukKwon
Copy link
Collaborator

Hi @rlrs, thanks for submitting the PR. A quick question: How is the environment variable different from TORCH_CUDA_ARCH_LIST which is already supported?

@rlrs
Copy link
Contributor Author

rlrs commented Jan 24, 2024

TORCH_CUDA_ARCH_LIST only applies to the CUDA install. The code doesn't have a similar option for the ROCm/HIP install. I used the name GPU_ARCHS to align with flash-attn for ROCm (https://github.com/ROCmSoftwarePlatform/flash-attention/blob/flash_attention_for_rocm/setup.py).

Copy link
Collaborator

@WoosukKwon WoosukKwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. LGTM! Thanks for the clarification!

@WoosukKwon WoosukKwon merged commit ea8489f into vllm-project:main Jan 29, 2024
17 checks passed
@WoosukKwon
Copy link
Collaborator

Oh it seems like PYTORCH_ROCM_ARCH is a more standard env variable name for this stuff. This will be fixed by merging #2627

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to build docker image on machines without GPU
2 participants