[AMD] Fix Aiter Prebuild When Releasing ROCm720 Image#20195
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an issue where Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses the issue of pre-building aiter kernels by separating the build and install steps. The changes are logical and move towards modern Python packaging practices. I've included a couple of suggestions to further improve the shell commands within the Dockerfile for conciseness and efficiency.
| sh -c "HIP_CLANG_PATH=/sgl-workspace/llvm-project/build/bin/ PREBUILD_KERNELS=1 GPU_ARCHS=$GPU_ARCH_LIST python setup.py build_ext --inplace" \ | ||
| && sh -c "HIP_CLANG_PATH=/sgl-workspace/llvm-project/build/bin/ GPU_ARCHS=$GPU_ARCH_LIST pip install -e ."; \ |
There was a problem hiding this comment.
For better readability and efficiency, you can combine these two sh -c calls into a single one. This avoids spawning a new shell for each command and keeps the related logic together. By using export, the environment variables are set for all subsequent commands within the same shell.
sh -c "export HIP_CLANG_PATH=/sgl-workspace/llvm-project/build/bin/; export GPU_ARCHS=$GPU_ARCH_LIST; PREBUILD_KERNELS=1 python setup.py build_ext --inplace && pip install -e ."; \
| sh -c "PREBUILD_KERNELS=1 GPU_ARCHS=$GPU_ARCH_LIST python setup.py build_ext --inplace" \ | ||
| && sh -c "GPU_ARCHS=$GPU_ARCH_LIST pip install -e ."; \ |
|
The fix works, ROCm720 images now successfully build AITER kernels: |
|
/tag-and-rerun-ci |
Motivation
Update aiter install command in
rocm.dockerfileto ensure aiter prebuild kernels exists when releasing docker image.Modifications
Accuracy Tests
The fix works, ROCm720 images now successfully build AITER kernels:
https://github.com/sgl-project/sglang/actions/runs/22856907949
Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci