Skip to content

[Feat] [AMD] docker: Install the sgl-amd-mono monokernel plugin in the ROCm image - #44621

Merged
HaiShaw merged 1 commit into
sgl-project:mainfrom
HaiShaw:docker/rocm-sgl-amd-mono
Oct 16, 2026
Merged

HaiShaw merged 1 commit into
sgl-project:mainfrom
HaiShaw:docker/rocm-sgl-amd-mono

Conversation

@kkHuang-amd

@kkHuang-amd kkHuang-amd commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

--monokernel-backend amd (the monokernel framework from #44353) needs the sgl-amd-mono plugin, which the ROCm image does not ship, so the option cannot be used with the published images.

Modifications

  • docker/rocm.Dockerfile: after the SGLang install, clone sgl-amd-mono at a pinned commit (SGL_AMD_MONO_REPO, SGL_AMD_MONO_COMMIT), pip install --no-deps -e ., and fail the build if its sglang.srt.plugins entry point is not registered.
  • Installed on gfx950 images only (its kernels target gfx950); --build-arg ENABLE_SGL_AMD_MONO=0 skips it. The plugin registers its specs lazily, so nothing changes unless a server passes --monokernel-backend amd.

Accuracy Tests

N/A (packaging only).

Speed Tests and Profiling

N/A (packaging only). The install step was run as written with the image's pip (26.2.1, setuptools 79): the package installs and the entry point check passes on gfx950 and gfx950-rocm724, and the step is skipped on gfx942 and gfx1250-rocm1010.

Checklist

Review and Merge Process

  1. Ping Merge Oncalls to start the process. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • Common commands include /tag-and-rerun-ci, /tag-run-ci-label, /rerun-failed-ci
  4. After green CI and required approvals, ask Merge Oncalls or people with Write permission to merge the PR.

CI States

Latest PR Test (Base): ✅ Run #38834352096
Latest PR Test (Extra): ❌ Run #38834352095
Latest PR Test (AMD ROCm 10): ❌ Run #38834352187

…ages

--monokernel-backend amd needs the sgl-amd-mono plugin, which the ROCm
image does not ship.

- Clone sgl-amd-mono at a pinned commit (SGL_AMD_MONO_REPO /
  SGL_AMD_MONO_COMMIT) after the SGLang install and pip install it
  (no deps), then check its sglang.srt.plugins entry point.
- gfx950 images only; ENABLE_SGL_AMD_MONO=0 skips it.
@HaiShaw
HaiShaw merged commit 536cdb4 into sgl-project:main Oct 16, 2026
127 of 133 checks passed
kevin-mii pushed a commit to kevin-mii/sglang that referenced this pull request Oct 16, 2026
The image pinned 815b104 (sgl-project#44621) while the srt_hip extra pins e07665c, so
the image would serve the plugin without the unread decode schedule. Each
pin now names the other, since they must move together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kevin-mii pushed a commit to kevin-mii/sglang that referenced this pull request Oct 16, 2026
The ROCm image installs SGLang with the srt_hip (or srt_hip_rocm724) extra,
which already installs the plugin at its pyproject pin. sgl-project#44621's clone and
editable reinstall then put a second pin on top, so the image and pip could
serve different plugin commits. Drop it: the extras' pin is the only one.
The plugin declares no dependencies, so the extras install matches the
old --no-deps install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kevin-mii pushed a commit to kevin-mii/sglang that referenced this pull request Oct 16, 2026
Restores sgl-project#44621's install step (editable checkout, registration check,
gfx950 gating, opt-out) that the previous commit removed, and takes its
commit from the srt_hip extras of the SGLang being built unless
SGL_AMD_MONO_COMMIT overrides it, the way CI reads AITER's pin from this
Dockerfile. The image and pip then install the same plugin commit, and a
bump is one change in pyproject_other.toml. The build fails if the extras
pin different or non-SHA commits, and skips SGLang versions that pin none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants