Repository navigation
[Test] [AMD] diffusion: Make multimodal_gen unit tests ROCm-aware - #44599
Merged
yichiche merged 3 commits intoOct 20, 2026
Merged
Conversation
- test_flux3_prims_ts_config: importorskip flashinfer, which ROCm does not ship - test_rowwise_fp8: skip the raw OCP e4m3fn apply test on ROCm - test_qwen3_5_encoder: skip the FA selection case on ROCm, where FA resolves to SDPA - test_residual_gate_add2: keep bit-exactness on CUDA, use fp16/bf16 tolerance on ROCm - test_kandinsky6_layerwise_offload: small tolerance for the fp32 audio VAE forward on ROCm; weights are still compared exactly
michaelzhang-ai
requested review from
AgainstEntropy,
BBuf,
HaiShaw,
kevin-mii,
mickqian,
niehen6174,
ping1jing2 and
yichiche
as code owners
October 15, 2026 23:31
This was referenced Oct 15, 2026
- test_flux3_image_dit_quant: use the single_process_model_parallel fixture (building the DiT reads the SP group size) and skip the two cases that import the flashinfer-backed PrimsTS weight pack when flashinfer is absent - test_moss_image_parallel: skip on ROCm, where importing sglang queries GPU 0 and fails with the GPUs hidden for the CPU workers
Its process_weights_after_loading packs the PrimsTS SwiGLU weight, which imports flashinfer.
This was referenced Oct 17, 2026
This was referenced Oct 21, 2026
This was referenced Oct 27, 2026
This was referenced Nov 4, 2026
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.
What
Seven multimodal_gen unit test files that landed recently fail on MI300 because they assume a CUDA host. Test-only changes; CUDA behavior of every test is unchanged.
Failing jobs: scheduled run on main, and the AMD jobs on #44421 (partition 0, 1, 2, 3).
Why, per test
test_flux3_prims_ts_config.py([Feat] diffusion: support FLUX 3 Image Klein #44418): importsflashinfer.prims_tsat module level. ROCm images don't ship flashinfer, so collection errors and the whole unit-test step of that partition stops. Nowpytest.importorskip.test_rowwise_fp8.py::TestFp8LinearMethodRowwise([Feat] diffusion: support FLUX 3 Image Klein #44418): handsFp8LinearMethod.applya raw OCPfloat8_e4m3fnweight. On ROCm, FP8 weights only reachapplyafter the loader converts them (fnuz / preshuffle), so aiter asserts and the hipBLASLt fallback returnsHIPBLAS_STATUS_NOT_SUPPORTED. Skipped on ROCm.test_qwen3_5_encoder.py::test_text_attention_default_and_explicit_selection[fa]([Feat] diffusion: Add support for the MOSS-Image family #44325): the ROCm platform resolves FA to SDPA, so the backend assert fails. Skipped on ROCm, same as the Kandinsky6 FA case in [Test] [AMD] diffusion: Skip the Kandinsky6 FA dispatch test on ROCm #44421.test_residual_gate_add2.py([Feat] diffusion: support FLUX 3 Image Klein #44418): fp16 output of the scalar path (hidden 250) is not bit-identical totorch.addcmulon MI300. CUDA still assertstorch.equal; ROCm now usesassert_closewith dtype defaults.test_flux3_image_dit_quant.py([Feat] diffusion: support FLUX 3 Image Klein #44418): building the tiny DiT constructs attention layers that read the SP group size, but the file never initializes one. It only passes when an earlier test in the same process left the group set up. Now uses thesingle_process_model_parallelfixture, astest_flux3_image_dit.pydoes. Three cases reach the flashinfer-backed PrimsTS weight pack and are skipped when flashinfer is absent.test_moss_image_parallel.py([Feat] diffusion: Add support for the MOSS-Image family #44325): runs two CPU workers withCUDA_VISIBLE_DEVICES="". On a ROCm build, importing sglang callsis_gfx1250_supported(), which reads GPU 0's properties and raisesNo CUDA GPUs are available. Skipped on ROCm.test_kandinsky6_layerwise_offload.py[*-audio-vae]([diffusion] model: support Kandinsky 6 #42743, also fails on main): the offloaded fp32 audio VAE differs from the resident run by up to ~1.2e-6. ROCm usesrtol=1e-4, atol=1e-5for the forward outputs; the exactstate_dictcomparison after offload is unchanged.Notes for the reviewer
addcmul. That holds on CUDA but not on MI300 for fp16 in at least the scalar path. The kernel's ROCm behavior should get a look from its owner; this PR only stops the test from blocking ROCm CI.is_gfx1250_supported()(and its gfx942/gfx95 siblings) query the device at import time, so importing sglang on a ROCm build with no visible GPU fails. That is a product issue outside this PR.Test plan
multimodal-gen-unit-teston the first commit: 5467 passed, 0 failed (job).test_rowwise_fp8skips its raw-FP8 case and the rest pass; the PrimsTS config file no longer stops partition 2, which surfaced the last two files above. The remaining failures in those jobs are the Kandinsky6 FA and FastH3 cases fixed by [Test] [AMD] diffusion: Skip the Kandinsky6 FA dispatch test on ROCm #44421.test_moss_image_parallelskips, and everytest_flux3_image_dit_quantcase passes or skips except the SwiGLU layout case, which the third commit skips for the same flashinfer reason. Partitions 0 and 3 are green. The other failures in partitions 1 and 2 are the Kandinsky6 FA and FastH3 cases fixed by [Test] [AMD] diffusion: Skip the Kandinsky6 FA dispatch test on ROCm #44421.CI States
Latest PR Test (Base): ✅ Run #38972196077
Latest PR Test (Extra): ❌ Run #38972196181
Latest PR Test (AMD ROCm 10): ❌ Run #38972195799