Skip to content

[Hardware][AMD] integrate aiter chunked prefill into vllm #18596

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

Merged
merged 20 commits into from
Jun 18, 2025

Conversation

Zzz9990
Copy link
Contributor

@Zzz9990 Zzz9990 commented May 23, 2025

CMD: VLLM_TORCH_PROFILER_DIR=/mnt/raid0/sixifang/vllm/vllm_profile HIP_VISIBLE_DEVICES=4,5,6,7 VLLM_ROCM_USE_AITER=1 VLLM_USE_V1=1 vllm serve /models/models--amd--Meta-Llama-3.1-8B-Instruct-FP8-KV/snapshots/fa42f9a9105c545755fea25cf69f49ac8c8b40e1/ --tensor-parallel-size 4 --gpu-memory-utilization 0.9 --trust-remote-code --disable-log-requests --block-size 16 --max-model-len 32768 --dtype float16 --quantization fp8 --no-enable-prefix-caching --max-num-batched-tokens=8192

Performance with aiter:

prompts isl osl con req_throughput median_e2e median_ttft median_tpot median_itl output_tps total_tps
1280 2048 1024 128 2.18 58777.36 1041.87 56.22 42.28 2236.56 6707.49

Performance without aiter:

prompts isl osl con req_throughput median_e2e median_ttft median_tpot median_itl output_tps total_tps
1280 2048 1024 128 0.94 135871.09 2621.44 129.89 94.26 964.17 2891.56

fsx950223 added 8 commits May 8, 2025 05:34
Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: fsx950223 <fsx950223@outlook.com>
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@mergify mergify bot added the v1 label May 23, 2025
Copy link

mergify bot commented May 23, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @Zzz9990.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label May 23, 2025
@tjtanaa
Copy link
Contributor

tjtanaa commented May 23, 2025

@Zzz9990 What is the difference with this PR? #17710
Could you rename the PR to be semantically related to the feature you are adding? "integrate aiter into vllm" is too broad and generic

@Zzz9990 Zzz9990 changed the title [Hardware][AMD] integrate aiter into vll [Hardware][AMD] integrate aiter chunked prefill into vllm May 26, 2025
@Zzz9990 Zzz9990 closed this May 26, 2025
@Zzz9990 Zzz9990 reopened this May 26, 2025
Copy link

mergify bot commented May 26, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @Zzz9990.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

fsx950223 added 2 commits May 26, 2025 07:09
Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: fsx950223 <fsx950223@outlook.com>
@houseroad houseroad added the rocm Related to AMD ROCm label Jun 10, 2025
@HAIAI
Copy link

HAIAI commented Jun 17, 2025

Let's get this merged soon. cc @houseroad @WoosukKwon @simon-mo

@houseroad houseroad added the ready ONLY add when PR is ready to merge/full CI is needed label Jun 17, 2025
Copy link
Collaborator

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Accept to unblock. Since only touch AMD related logic, should be safe on other platform.

Could @HAIAI or someone from AMD approve this PR?

Copy link

@HAIAI HAIAI left a comment

Choose a reason for hiding this comment

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

LGTM

@HAIAI
Copy link

HAIAI commented Jun 17, 2025

@Zzz9990 would you take a look at failed checks?

@houseroad houseroad enabled auto-merge (squash) June 17, 2025 08:08
@houseroad
Copy link
Collaborator

@houseroad houseroad disabled auto-merge June 17, 2025 09:56
@houseroad
Copy link
Collaborator

ImportError: cannot import name 'rocm_aiter_fused_add_rms_norm' from 'vllm.model_executor.layers.layernorm' (/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/layernorm.py)

Signed-off-by: fsx950223 <fsx950223@outlook.com>
@Zzz9990
Copy link
Contributor Author

Zzz9990 commented Jun 17, 2025

ImportError: cannot import name 'rocm_aiter_fused_add_rms_norm' from 'vllm.model_executor.layers.layernorm' (/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/layernorm.py)
Done

@gshtras
Copy link
Collaborator

gshtras commented Jun 17, 2025

Please note all the failing AMD checks. Updating from the latest should help fix the build to get started.

@HAIAI
Copy link

HAIAI commented Jun 17, 2025

@Zzz9990 @fsx950223 can you update/rebase from main?

Copy link
Contributor

@SageMoore SageMoore left a comment

Choose a reason for hiding this comment

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

Looks reasonable. If you can delete some more of the cascade attention code in the builder/metadata that would be great. If not, it's no big deal.

)
return output
else:
raise NotImplementedError(
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAICT you need the use_cascade_attention method for API compatibility but everything else should be able to be removed. If not it's fine. No worries.

@houseroad houseroad enabled auto-merge (squash) June 18, 2025 06:20
Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: fsx950223 <fsx950223@outlook.com>
auto-merge was automatically disabled June 18, 2025 07:35

Head branch was pushed to by a user without write access

@simon-mo simon-mo merged commit 8b6e1d6 into vllm-project:main Jun 18, 2025
66 of 68 checks passed
yeqcharlotte pushed a commit to yeqcharlotte/vllm that referenced this pull request Jun 22, 2025
…ct#18596)

Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: charlifu <charlifu@amd.com>
Co-authored-by: fsx950223 <fsx950223@outlook.com>
Co-authored-by: charlifu <charlifu@amd.com>
minpeter pushed a commit to minpeter/vllm that referenced this pull request Jun 24, 2025
…ct#18596)

Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: charlifu <charlifu@amd.com>
Co-authored-by: fsx950223 <fsx950223@outlook.com>
Co-authored-by: charlifu <charlifu@amd.com>
Signed-off-by: minpeter <kali2005611@gmail.com>
yangw-dev pushed a commit to yangw-dev/vllm that referenced this pull request Jun 24, 2025
…ct#18596)

Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: charlifu <charlifu@amd.com>
Co-authored-by: fsx950223 <fsx950223@outlook.com>
Co-authored-by: charlifu <charlifu@amd.com>
Signed-off-by: Yang Wang <elainewy@meta.com>
gmarinho2 pushed a commit to gmarinho2/vllm that referenced this pull request Jun 26, 2025
…ct#18596)

Signed-off-by: fsx950223 <fsx950223@outlook.com>
Signed-off-by: charlifu <charlifu@amd.com>
Co-authored-by: fsx950223 <fsx950223@outlook.com>
Co-authored-by: charlifu <charlifu@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/build documentation Improvements or additions to documentation ready ONLY add when PR is ready to merge/full CI is needed rocm Related to AMD ROCm v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.