[AMD][ROCm] Add optional device-resident ordering-edge runtime build (rocm-systems#11212) - #39282
Open
karverma-amd wants to merge 1 commit into
Open
karverma-amd wants to merge 1 commit into
karverma-amd wants to merge 1 commit into
Conversation
…(rocm-systems#11212) Optional Dockerfile layered on an existing SGLang ROCm image that rebuilds ROCr (libhsa-runtime64) + CLR/HIP (libamdhip64) with the ROCm/rocm-systems#11212 device-resident ordering-edge series cherry-picked onto the image's own base commit (ROCr stays ABI-compatible; ROCM_KPACK_ENABLED=ON for kpack device code), then swaps the two libraries in and sets ROCPROFILER_QUEUE_INTERPOSITION=0. Recovers the low-concurrency ROCm decode regression seen with GPU_MAX_HW_QUEUES > 4 by moving cross-stream/hipgraph dependency polls to device-local VRAM. Mirrors vllm-project/vllm#55099. Opt-in only; default builds are unchanged, and DEBUG_CLR_DISABLE_ORDERING_EDGE=1 reverts at runtime. Co-authored-by: Cursor <cursoragent@cursor.com>
karverma-amd
marked this pull request as ready for review
September 13, 2026 18:58
karverma-amd
requested review from
Fridge003,
HaiShaw,
ishandhanani,
ispobock,
sogalin and
yctseng0211
as code owners
September 13, 2026 18:58
Contributor
Author
|
Related: #39314 (Enable DSv4 multi-stream compressor overlap on HIP) depends on this ordering-edge runtime — without the device-resident ordering edges, the multi-stream overlap's cross-stream/multi-queue dispatch cost dominates and the concurrent kernels contend. With this runtime the overlap is clean (−4.5 to −8.5% TPOT at conc 1‑8 on MI355X DeepSeek-V4). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
On ROCm, cross-stream / hipgraph dependency polls default to host-visible memory and cross PCIe. With
GPU_MAX_HW_QUEUES > 4this manifests as a low-concurrency decode regression. ROCm/rocm-systems#11212 adds device-resident ordering edges (hsa_amd_signal_create_v2+HSA_AMD_SIGNAL_CREATE_DEVICE_MEM_VALUE_WORDin ROCr, plus the CLR side that names a device-resident ordering-edge value word on cross-queue barrier deps) so those polls come from device-local VRAM instead. vLLM adopted the same mitigation in vllm-project/vllm#55099.What this PR adds
An optional, opt-in
docker/rocm-ordering-edge.Dockerfilelayered on top of an existing SGLang ROCm image. It:libhsa-runtime64) + CLR/HIP (libamdhip64) from the exactrocm-systemscommit the base image was built from, with the [DO NOT MERGE] test deepgemm warmup error #11212 series cherry-picked on top (so ROCr stays at its native version and remains ABI-compatible with the image'srocminfo/aiterarch detection);ROCM_KPACK_ENABLED=ONso the rebuiltlibamdhip64stays compatible with the image's kpack device-code archives;ROCPROFILER_QUEUE_INTERPOSITION=0.Notes
GPU_MAX_HW_QUEUES > 4decode regression.DEBUG_CLR_DISABLE_ORDERING_EDGE=1.BASE_IMAGE,ROCM_RUNTIME_COMMIT) must be retargeted together for a base image other than the validated default; a mismatched commit risks an ABI break. Seedocker/rocm-ordering-edge.md.Test plan
Build-recipe / infra change (no model-code or runtime-default change); no accuracy or perf test applies. Verified the image builds and
rocminfo/kernel launch work after the library swap.Made with Cursor
CI States
Latest PR Test (Base): ✅ Run #34745216401
Latest PR Test (Extra): ❌ Run #34745216238
Latest PR Test (AMD ROCm 10): ➖ No AMD PR run found for this commit.