Skip to content

[AMD] Add gfx1151 (Strix Halo / Ryzen AI MAX+) Docker image - #33939

Merged
HaiShaw merged 2 commits into
sgl-project:mainfrom
alexnails:alexnails/rocm-gfx1151-docker
Sep 11, 2026
Merged

HaiShaw merged 2 commits into
sgl-project:mainfrom
alexnails:alexnails/rocm-gfx1151-docker

Conversation

@alexnails

@alexnails alexnails commented Aug 7, 2026 •

Copy link
Copy Markdown
Collaborator

Co-author: @hubertlu-tw, @ankith117

Motivation

The existing ROCm image targets CDNA GPUs and includes components that do not support gfx1151. This PR adds a separate image for Strix Halo systems such as the Ryzen AI MAX+ 395.

The scope is limited to building and running SGLang on gfx1151. General RDNA kernel support and performance tuning remain separate work.

Changes

  • Add docker/rocm-gfx1151.Dockerfile, based on AMD's stable ROCm 7.2.4 and PyTorch 2.9.1 image. The base image is pinned by digest.
  • Build sgl-kernel for gfx1151. The build-time patch adds gfx1151 to the supported target list and uses wave size 32 consistently in host and device compilation. It fails if the expected upstream source changes.
  • Keep AMD's PyTorch package from the base image and install the compatible SGLang HIP dependencies around it.
  • Install AITER because current startup imports depend on it, but keep AITER runtime dispatch disabled on gfx1151.
  • Remove the custom launch wrapper. Callers select Triton attention explicitly with --attention-backend triton.
  • Add a daily workflow that publishes rocm/sgl-dev:v<VERSION>-rocm724-gfx1151-<YYYYMMDD>.

The build-time kernel patch can be removed after equivalent source-level gfx1151 support lands in sgl-kernel.

Validation

The image was built on a Ryzen AI MAX+ 395 with Radeon 8060S graphics under WSL2. The final image was 13.16 GB. Inside the container:

  • import sglang passed.
  • import sgl_kernel passed.
  • torch.cuda.is_available() returned True.
  • PyTorch identified the GPU as AMD Radeon(TM) 8060S Graphics gfx1151.

The following models were launched one at a time with Triton attention, --mem-fraction-static 0.5, a 4096-token context, one running request, and decode graph capture limited to batch size 1:

  • Qwen/Qwen2.5-7B-Instruct-AWQ
  • microsoft/Phi-4-mini-instruct
  • mistralai/Mistral-7B-Instruct-v0.3
  • Qwen/Qwen3.5-9B
  • lmsys/gpt-oss-20b-bf16

Each server completed three sequential chat completion requests covering arithmetic, factual recall, and sequence completion. Every response matched the expected answer, and each server exited cleanly after the checks.

On this system, --mem-fraction-static 0.5 allocated approximately 52 GB of the reported shared-memory budget to model weights and caches. This confirms that the setting works for these functional checks; it is not a performance or production-sizing recommendation.

Throughput, latency, concurrency, memory
tuning, and CUDA graph tuning will be measured separately.

Launch example

docker run --rm \
  --device=/dev/dxg \
  -v /usr/lib/wsl/lib/libdxcore.so:/usr/lib/libdxcore.so:ro \
  -v /opt/rocm/lib/libhsa-runtime64.so.1:/opt/rocm/lib/libhsa-runtime64.so.1:ro \
  -v /opt/rocm/lib/librocdxg.so:/usr/lib/librocdxg.so:ro \
  --security-opt seccomp=unconfined \
  --ipc=host \
  --shm-size=16g \
  -p 30000:30000 \
  -v "$HOME/.cache/huggingface:/root/.cache/huggingface" \
  sglang-rocm:gfx1151 \
  python3 -m sglang.launch_server \
    --model-path microsoft/Phi-4-mini-instruct \
    --attention-backend triton \
    --host 0.0.0.0 \
    --port 30000 \
    --mem-fraction-static 0.5 \
    --context-length 4096 \
    --cuda-graph-max-bs-decode 1

Follow-up work


CI States

Latest PR Test (Base): ✅ Run #34547855930
Latest PR Test (Extra): ❌ Run #34547855835
Latest PR Test (AMD ROCm 10): ➖ No AMD PR run found for this commit.

@github-actions github-actions Bot added the amd label Aug 7, 2026
@alexnails
alexnails marked this pull request as draft August 7, 2026 04:04
@hubertlu-tw
hubertlu-tw force-pushed the alexnails/rocm-gfx1151-docker branch from 421336c to 4e7c752 Compare September 10, 2026 02:15
@hubertlu-tw
hubertlu-tw marked this pull request as ready for review September 10, 2026 02:21
@hubertlu-tw hubertlu-tw changed the title [ROCm] Add gfx1151 (Strix Halo / Ryzen AI MAX+) Docker image [AMD] Add gfx1151 (Strix Halo / Ryzen AI MAX+) Docker image Sep 10, 2026
@hubertlu-tw hubertlu-tw added the run-ci CI: run the baseline test suite on this PR label Sep 10, 2026
alexnails and others added 2 commits September 10, 2026 17:28
Add a standalone ROCm image for AMD Strix Halo and the build-time sgl-kernel adaptations required for gfx1151.
@hubertlu-tw
hubertlu-tw force-pushed the alexnails/rocm-gfx1151-docker branch from b455045 to 08e8200 Compare September 11, 2026 00:45
&& git checkout ${AITER_COMMIT} \
&& git submodule update --init --recursive \
&& GPU_ARCHS=${GPU_ARCH} pip install --no-cache-dir --no-build-isolation \
--config-settings editable_mode=compat -e .

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

When installing AITER, if not set AITER_USE_SYSTEM_TRITON=1, AITER will reinstall Triton 3.7, is this expected?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good catch. This was not intended. I checked the released image: the ROCm 7.2.4 base provides triton==3.5.1+rocm7.2.4.gita272dfa8, but the pinned AITER installer replaces it with triton==3.7.0+amd.rocm7.2.0.git89002410. Since this image sets SGLANG_USE_AITER=0 and installs AITER only to satisfy current startup imports, it should preserve the base image’s ROCm-matched Triton by setting AITER_USE_SYSTEM_TRITON=1 for the AITER installation. The PR has already merged, so I will handle this as a follow-up fix. Thanks for catching it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I tested AITER_USE_SYSTEM_TRITON=1 against the merged image before preparing a follow-up. It preserves the base image’s triton==3.5.1+rocm7.2.4, but the pinned AITER commit requires Triton 3.6 or newer. Both import aiter and Qwen2.5 AWQ server startup fail with RuntimeError: aiter gluon kernels require triton>=3.6.0. Therefore, setting this variable alone is not a valid fix. With the current AITER pin, its Triton 3.7 installation is expected and is required for startup. A longer-term fix should remove the unconditional AITER import dependency on this path or use an AITER/Triton combination compatible with the ROCm 7.2.4 base.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @bingxche,
Thanks for raising the concern.
AITER_USE_SYSTEM_TRITON=1 does not pass.

  • Build succeeds and preserves Triton 3.5.1+rocm7.2.4.
  • import aiter fails because pinned AITER requires Triton ≥3.6.

@HaiShaw HaiShaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@HaiShaw
HaiShaw merged commit b9899b0 into sgl-project:main Sep 11, 2026
95 of 99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amd run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants