Skip to content

[AMD] Fix the diffusion perf fixture lookup - #38686

Merged
HaiShaw merged 1 commit into
mainfrom
amd_fix_diffusion_0909
Sep 10, 2026
Merged

HaiShaw merged 1 commit into
mainfrom
amd_fix_diffusion_0909

Conversation

@yctseng0211

@yctseng0211 yctseng0211 commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

Fix AMD Nightly Test nightly-1-gpu-zimage-turbo

Motivation

nightly-1-gpu-zimage-turbo in Nightly Test (AMD ROCm 7.2) has failed every night since Sep 7 (run #687):

E       fixture 'perf_results' not found

#38185 made DiffusionServerBase's autouse fixture request perf_results, which is declared in python/sglang/multimodal_gen/test/server/conftest.py. pytest loads conftest.py by the collected file's directory, so the AMD tests in test/registered/amd/ never see it and error at setup. test_wan22_fp8_mla.py fails the same way. (The two test/registered/xpu/ diffusion tests share the cause; left to the XPU owners.)

Modifications

Test only, AMD only.

  • Add test/registered/amd/conftest.py re-exporting perf_results, the same way these tests already re-export diffusion_server.
  • Drop the now-dead teardown_class overrides: [diffusion] test: validate every repeated server request #38185 removed DiffusionServerBase.teardown_class, so super().teardown_class() only ever raises into a bare except AttributeError: pass.

Verification

MI300X, ROCm 7.2:

Modifications

Accuracy Tests

Speed Tests and Profiling

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 #34354307521
Latest PR Test (Extra): ❌ Run #34354307312
Latest PR Test (AMD ROCm 10): ❌ Run #34354307491

@yctseng0211

yctseng0211 commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator Author

https://github.com/sgl-project/sglang/actions/runs/34354614057/job/102476029224

nightly-1-gpu-zimage-turbo passes on this branch

All changes are confined to test/registered/amd/; no runtime or library code is touched. Safe to merge.

@HaiShaw
HaiShaw merged commit 6b2e13b into main Sep 10, 2026
151 of 163 checks passed
@HaiShaw
HaiShaw deleted the amd_fix_diffusion_0909 branch September 10, 2026 07:07
murthy-l added a commit to murthy-l/sglang that referenced this pull request Sep 27, 2026
  Add test/registered/xpu/test_xpu_flux2_klein.py, a manual 1-GPU test
  for FLUX.2-klein-4B and -9B on Intel XPU (bf16, 4 steps, 1024x1024).

  - t2i: one fixed prompt, gated on CLIP score (clip-vit-base-patch32,
    >= 0.25). Healthy 4B/9B output scores >= 0.4198; black, white and
    noise frames score <= 0.1842. If the score cannot be computed, the
    test fails instead of passing unchecked.
  - ti2i: CUDA flux_2_ti2i's edit prompt and input image, at 1024x1024
    with seed 0, compared against a stored reference image with
    compare_with_gt (CLIP similarity, SSIM, PSNR, mean abs diff) at
    flux_2_ti2i's H100 thresholds. There is no XPU reference set in
    ci-data-diffusion, so references are read from
    SGLANG_CONSISTENCY_GT_DIR. A run without a reference fails and saves
    its output under $SGLANG_DIFFUSION_ARTIFACT_DIR/missing_consistency_gt/
    to be inspected and promoted.
  - Every output is saved to $SGLANG_DIFFUSION_ARTIFACT_DIR before it is
    checked, so a failing image is kept.
  - Residency is pinned per size: 4B dit=resident; 9B also
    text_encoder=layerwise-offload, so 1024x1024 warmup fits in 24 GiB.
  - Perf is neither checked nor collected (collect_perf=False). The
    flux2_klein_* case ids added here have no perf_baselines/xpu_b60.json
    entry; klein-4B t2i perf on XPU is already covered by the existing CI
    case flux_2_klein_image_t2i.
  - Registered to nightly-xpu-1-gpu with nightly=True, like its siblings,
    and disabled, so the Intel nightly lists it as skipped and never runs
    it.

  Add test/registered/xpu/conftest.py, which re-exports the diffusion
  perf_results fixture as test/registered/amd/conftest.py does (sgl-project#38686).
  Without it, a plain pytest run of any DiffusionServerBase test in this
  directory errors with "fixture 'perf_results' not found".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
murthy-l added a commit to murthy-l/sglang that referenced this pull request Oct 19, 2026
  Add test/registered/xpu/test_xpu_flux2_klein.py, a manual 1-GPU test
  for FLUX.2-klein-4B and -9B on Intel XPU (bf16, 4 steps, 1024x1024).

  - t2i: one fixed prompt, gated on CLIP score (clip-vit-base-patch32,
    >= 0.25). Healthy 4B/9B output scores >= 0.4198; black, white and
    noise frames score <= 0.1842. If the score cannot be computed, the
    test fails instead of passing unchecked.
  - ti2i: CUDA flux_2_ti2i's edit prompt and input image, at 1024x1024
    with seed 0, compared against a stored reference image with
    compare_with_gt (CLIP similarity, SSIM, PSNR, mean abs diff) at
    flux_2_ti2i's H100 thresholds. There is no XPU reference set in
    ci-data-diffusion, so references are read from
    SGLANG_CONSISTENCY_GT_DIR. A run without a reference fails and saves
    its output under $SGLANG_DIFFUSION_ARTIFACT_DIR/missing_consistency_gt/
    to be inspected and promoted.
  - Every output is saved to $SGLANG_DIFFUSION_ARTIFACT_DIR before it is
    checked, so a failing image is kept.
  - Residency is pinned per size: 4B dit=resident; 9B also
    text_encoder=layerwise-offload, so 1024x1024 warmup fits in 24 GiB.
  - Perf is neither checked nor collected (collect_perf=False). The
    flux2_klein_* case ids added here have no perf_baselines/xpu_b60.json
    entry; klein-4B t2i perf on XPU is already covered by the existing CI
    case flux_2_klein_image_t2i.
  - Registered to nightly-xpu-1-gpu with nightly=True, like its siblings,
    and disabled, so the Intel nightly lists it as skipped and never runs
    it.

  Add test/registered/xpu/conftest.py, which re-exports the diffusion
  perf_results fixture as test/registered/amd/conftest.py does (sgl-project#38686).
  Without it, a plain pytest run of any DiffusionServerBase test in this
  directory errors with "fixture 'perf_results' not found".

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants