Repository navigation
feat(docker): add ROCm image for MI350X and MI300X - #533
Conversation
Single-node engines now default mm_feature_transport to cuda_ipc (redai-studio#495), but SGLang rejects that transport on ROCm ("--mm-feature-transport=cuda_ipc requires NVIDIA CUDA"), so every SGLang engine failed to start on AMD GPUs. ## 🐛 Bug Fix - Skip the cuda_ipc default for policy and GenRM engines when running on ROCm, leaving SGLang's automatic transport selection; CUDA behavior is unchanged ## ✅ Tests - Pin is_rocm=False for the existing CUDA transport cases so they do not depend on the host GPU - Add a ROCm case for policy and GenRM engines expecting the auto policy
Add docker/Dockerfile.rocm so Relax can train on AMD Instinct GPUs. GPU_ARCH selects gfx950 (MI350X/MI355X, default) or gfx942 (MI300X/MI325X). - Build on SGLang's official v0.5.21 ROCm 10 image, pinned by digest per arch - Apply the same SGLang patch, Rust tree core, DP-aware router and Megatron patch sequence as Dockerfile.cu13 - Disable the aiter fused qk-norm + M-RoPE decode path, which corrupts the KV cache and breaks Qwen3-VL on ROCm (fixed upstream in sgl-project/sglang#44266) - Install Transformer Engine, apex and flash-attn from prebuilt ROCm wheels, verified against their release SHA-256 digests - Install requirements.txt without the pins that would downgrade the base NumPy 2 stack, plus the ROCm additions in rocm-runtime-requirements.txt
- Add the ROCm guide (en/zh): supported GPUs, image build, container flags, training and ROCm runtime settings - Link it from the installation guides and the Getting Started sidebar - Add the ROCm build commands to docker/README.md
|
Thanks for contributing to Relax, @Vivicai1005! 感谢你为 Relax 做出贡献! 📚 Contribution guide / 贡献指南Describe the problem, your changes, and how you validated them. Keep each PR focused and run 请说明问题、改动和验证方式,保持 PR 聚焦,并在提交前运行 🛠️ CI commands / CI 指令
Put one command on the first line of a new PR comment. Rerun/cancel require PR authorship or repository write access. 在新 PR 评论的首行写一条指令。PR 作者或有仓库写权限的贡献者可以重跑、取消 CI。 🔎 Merge requirements / 合入条件GitHub:⏳ 合入条件未满足
|
|
Two documentation points:
This comment is replied by codex (gpt-6)
|
Bring in the CPU/GPU unit-test split from main (redai-studio#539). Preserve the ROCm transport regression tests in tests/cpu/backends/sglang with the migrated fixture import path. Co-authored-by: Codex <[email protected]>
Nyanpasu 审查看板审查状态: 🔎 审查中 审查版本: 226183b 目标分支: main 审查已启动,固定 head 的 11 个变更路径已完成 scope admission;正在核对 ROCm 镜像构建、运行时 transport 和双语文档命令。
尚无已确认的问题记录;这不代表审查通过。 提交范围 · 接收 11 · 建议移出 0 · 待确认 0接收 11 个文件 · 建议移出 0 个文件 · 待确认 0 个文件。移出与待确认部分暂停深审,不代表审查通过。
Powered by Nyanpasu with Codex, please check the suggestions carefully.
|
Thanks — both fixed in ff36904: the ROCm guides now mount "$(pwd):/root/Relax" from the repository root, and AMD ROCm is nested under Installation in the English and Chinese sidebars. |
What
The ROCm image (gfx950/gfx942), the en/zh ROCm guide plus the docker/README.md section, and the cuda_ipc fix for a ROCm regression on main since #495.
How
Testing
End-to-end colocated GRPO on 8× MI350X (
gfx950image):mismatch_klrun-qwen3-4B-8xgpu.sh)run-qwen3-vl-4B-8xgpu.sh)pre-commit run --all-filespassesTests pass (
pytest tests/)New tests added (if applicable)
Documentation updated (if applicable)
Type of Change
Screenshots / Logs