[AMD] Let the ROCm suite honour the ci-sglang-pr and ci-megatron-pr directives - #2674
Conversation
_run-ci-rocm.yml already parses ci-megatron-pr: and ci-sglang-pr: and installs what they name, but both steps are gated on skip_dependency_install, which defaults to true and which pr-test-rocm.yml never overrode. The parsing was therefore unreachable and the ROCm suite always ran the image's baked copies. Resolve the flag in the entry point instead: naming either ref, through the PR body or the new dispatch inputs, turns the install step on; naming neither keeps the image as before. The dispatch inputs default to empty rather than to a branch name so that a plain manual run still keeps the image.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
VerificationI checked the claim statically against The gate is real. On - name: Resolve dependency refs
if: ${{ !inputs.skip_dependency_install }}
- name: Install dependencies
if: ${{ !inputs.skip_dependency_install }}
The load-bearing assumption holds. Positive control: live ROCm runDispatched on this branch (a dispatch runs the branch's own workflow definition, so the new
Run 32332460398, green, 2 min.
Shard 0 (job 96315638494) shows the same lines. Negative controlNaming nothing must keep the image, or this change would be a regression for every ordinary ROCm run.
Release CI is also unaffected: What this does not prove
|
The unnamed side used to fall back to its moving branch head, so asking to test one SGLang ref also moved Megatron-LM off the version the image ships. On ROCm the image is the baseline, so leave whichever side nobody named alone.
To be reverted. Every stage-c-4-gpu-mi350 registration on main is disabled, so the stage is skipped no matter what label a run carries and the install step this PR unlocks can never be seen. numba comes with it because SGLang is installed with --no-deps and its Inkling processor imports it (PR 2671).
Round two: the PR-description path, on this PRThe first comment proved the Setup, all of it temporary and all of it since removed (see Cleanup at the end):
Run 32334431157. The directive is read from the body
The named ref reaches the MI350 runnerFrom The unnamed side is left alone — observed, not inferredOnly No The resulting tree runs
Both shards green, whole run green. Two claims this run supports to different degrees, worth keeping apart:
The job log also carries What the shape of this evidence isThis matters more than the green tick. All 8 Two consequences:
The image is missing numba, and this feature makes that reachableThe scratch run needed So the published The part that concerns this PR: the install step reinstalls SGLang with What this still does not prove
CleanupThree things existed only to produce the run above, and all three have been removed:
The net diff against |
…observed" This reverts commit 243678d.
The ROCm workflow now requires resolve-ci-deps and forwards its output to the reusable runner. Update the workflow seam test to assert that complete dependency chain so stage-a-cpu no longer fails on the stale two-resolver expectation.
This cause cpu ci to be failed, I removed it in pr description |
Create an empty commit so GitHub Actions receives a fresh pull_request event with the corrected PR body.
|
This publication will advance the PR head to |
Reapply the ROCm Megatron compatibility patch after selecting a requested dependency ref. Accept refs that already contain the same patch and fail explicitly when a ref is incompatible.
|
Publishing |
The ROCm image removes /tmp/amd_patch before runtime, so source the compatibility patch from the checked-out Miles workspace. Preserve the apply, already-present, and incompatible-ref behavior.
|
Publishing |
guapisolo
left a comment
There was a problem hiding this comment.
doc change make sense
…irectives (#2674) Co-authored-by: guapisolo <guapisolo@gmail.com>
Summary
Let ROCm CI honor dependency-ref overrides while preserving unnamed baked dependencies.
Motivation
The ROCm suite parsed
ci-sglang-pr:andci-megatron-pr:directives but always kept dependency installation disabled, so a requested ref never reached an MI350 job.Usage
Add a dependency ref to a PR body or supply the matching manual-dispatch input:
The named dependency is fetched and installed over its image copy. An unnamed dependency stays baked into the image, and runs with no override retain the existing skip-install path.
Design Notes
resolve-ci-deps; its decision gates the MI350 stage, reaches_run-ci-rocm.ymlas a boolean, then makes the reusable workflow selectively replace named dependencies while preserving unnamed baked dependencies; CUDA/CPU selection plus ROCm image selection remain outside this boundary.resolve-ci-depsmakes the stage wait for a successful dependency decision before allocating the reusable ROCm job._run-ci-rocm.ymlleaves unnamed refs empty instead of substituting moving default branches, so a single override cannot replace the other baked dependency.Verification
TestRocmWorkflowScopeSeam::test_stage_consumes_policy_and_preserves_manual_full_scope:1 passed; proves the stage requiresresolve-ci-depsand forwards its output.tests/ci/run_suite.py --hw cpu --suite stage-a-cpu --auto-partition-id 3 --auto-partition-size 4 --cadence regular --labels:2189 passed, 9 skipped; proves the corrected workflow seam passes the failed CPU shard.pre-commit run --files tests/ci/test/test_run_suite.py: all hooks passed.Review Focus
.github/workflows/pr-test-rocm.yml: directive/input detection must gate the MI350 stage without changing image or policy resolution..github/workflows/_run-ci-rocm.yml: overriding one dependency must preserve the unnamed image-baked dependency.tests/ci/test/test_run_suite.py: the seam assertion must track the full resolver dependency and forwarding contract.