Skip to content

[Bugfix][MiniMax-H3] Use Hopper-safe modulation precision - #7693

Merged
hsliuustc0106 merged 13 commits into
vllm-project:mainfrom
david6666666:codex-issue-7035-h100-determinism
Sep 18, 2026
Merged

hsliuustc0106 merged 13 commits into
vllm-project:mainfrom
david6666666:codex-issue-7035-h100-determinism

Conversation

@david6666666

@david6666666 david6666666 commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix intermittent MiniMax-H3 I2VA accuracy failures on H100/SM90 by matching the unfused BF16 dtype boundaries in the two fused RMSNorm + AdaLN modulation kernels on Hopper only.

Diagnosis

  • The H100 I2VA failure is isolated to the repeated image-conditioned DiT trajectory; Ref2VA remains passing.
  • Build 15562 with the separate VAE Q/K launches reverted from [Kernel][MiniMax-H3] Run Q/K RMSNorm-RoPE in one launch #7167 still failed, so the Q/K launch path is not the cause of this CI failure. That change has been reverted from this PR.
  • The fused modulation kernels kept RMSNorm/AdaLN intermediates in FP32, while the unfused path rounds through BF16. On SM90, the repeated precision difference can move the 50-step I2VA result below the CI threshold.
  • B300/SM103 keeps the existing FP32 path: enabling the BF16 path globally regressed the local B300 I2VA run, so this fix is intentionally architecture-scoped.

Fix

  • Select the BF16 affine boundaries only when the CUDA compute capability major is 9.
  • Keep the existing modulation path on other architectures.
  • Register the shared modulation source in the MiniMax-H3 CI dependency map so this change runs the I2VA/Ref2VA accuracy job.

Validation

  • B300, 4-GPU HSDP + 4-way Ulysses, static regional compile, existing path: SSIM 0.975250, PSNR 35.859771.
  • The same B300 setup with the BF16 path forced globally: SSIM 0.969440, PSNR 33.222849, confirming the architecture gate is required.
  • Targeted tests: 49 passed, 3 skipped.
  • MiniMax-H3 I2VA/Ref2VA accuracy passed in Build 15553 and Build 15555; Build 15562 used the reverted Q/K launch experiment and failed.

Signed-off-by: david6666666 530634352@qq.com

Signed-off-by: david6666666 <530634352@qq.com>
@vllm-omni-review-bot

Copy link
Copy Markdown

This PR appears to belong to: docs/design/module/diffusion/offloader.md, docs/design/module/diffusion/diffusion_model_integration.md, docs/design/module/diffusion/index.md.

Module owners: @wtomin @Isotr0py @princepride

Routing: @wtomin via module of the changed files, module named in the PR description, CODEOWNERS; @Isotr0py via module of the changed files, module named in the PR description; @princepride via module of the changed files, module named in the PR description

@david6666666, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer.

Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment.

@david6666666 david6666666 added the nightly-test label to trigger buildkite nightly test CI label Sep 17, 2026
@vllm-omni-review-bot

vllm-omni-review-bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Omni ReviewBot triage note

Resolved as of 49fa48895100: the high-priority or low-quality signal noted on an earlier commit no longer applies.

@david6666666 david6666666 added nightly-test label to trigger buildkite nightly test CI and removed nightly-test label to trigger buildkite nightly test CI labels Sep 17, 2026
…collectives"

This reverts commit 2aac8bd.

Signed-off-by: david6666666 <530634352@qq.com>
This reverts commit 7a2a16f.

Signed-off-by: david6666666 <530634352@qq.com>
Signed-off-by: david6666666 <530634352@qq.com>
…sue-7035-h100-determinism

Signed-off-by: david6666666 <530634352@qq.com>
@david6666666 david6666666 changed the title [Bugfix][MiniMax-H3] Keep keyframe VAE encoding rank-local [Bugfix][MiniMax-H3] Restore H100 VAE QK launch precision Sep 17, 2026
@david6666666 david6666666 added nightly-test label to trigger buildkite nightly test CI and removed nightly-test label to trigger buildkite nightly test CI labels Sep 17, 2026
Signed-off-by: david6666666 <530634352@qq.com>

Copy link
Copy Markdown
Collaborator

The H100 result for 3b84cc4a is now available: Build 15549's accuracy job still fails I2VA with SSIM 0.971247 / PSNR 33.627597 dB (required PSNR ≥34), identical to the preceding failures.

One candidate worth checking is the keyframe cuDNN math mode. The current context still sets allow_tf32=True. Deterministic convolution does not imply that TF32 is disabled.

A controlled four-run comparison on 4×H800, using base cb439f3e8439 rather than this PR head, produced:

Run Keyframe cuDNN TF32 SSIM PSNR (dB) Result
Original True 0.947329 27.533157 Fail
Patched False 0.973072 34.587187 Pass
Reverted True 0.947329 27.533157 Fail
Patched again False 0.973072 34.587187 Pass

The only model-code behavior change was allow_tf32=True → False inside _minimax_h3_keyframe_encode_context(); the parallel encoding path was unchanged. Generated MP4s were byte-identical within each setting, including after reverting. All four runs restarted the model service and completed the original I2VA fixture with unchanged inputs, seed 0, 50 steps, and thresholds. Offline asset loading preserved the fixture's original SHA256 checks.

Environment: MiniMax-H3 FL2VA revision 42ed227ee7df40d41602854ae760620d6eb651fe, PyTorch 2.13.0+cu130, cuDNN 92000, vLLM 0.29.0. Test:

python -m pytest -s -v -o addopts='' \
  tests/e2e/accuracy/minimax_h3/test_minimax_h3_i2va_ref2va_similarity.py::test_minimax_h3_i2va_matches_official_reference \
  --run-level full_model

This is evidence for one H800 fixture, not confirmation of an H100 fix or the official reference's math mode. Could we try the same scoped TF32 change on the failing H100 setup and compare the keyframe latents? The shared encode_image path also needs coverage for Ref2VA still-image inputs before generalizing the change.

@david6666666 david6666666 added nightly-test label to trigger buildkite nightly test CI and removed nightly-test label to trigger buildkite nightly test CI labels Sep 18, 2026
Signed-off-by: david6666666 <530634352@qq.com>
@david6666666 david6666666 added nightly-test label to trigger buildkite nightly test CI and removed nightly-test label to trigger buildkite nightly test CI labels Sep 18, 2026
Signed-off-by: david6666666 <530634352@qq.com>
@david6666666 david6666666 added nightly-test label to trigger buildkite nightly test CI and removed nightly-test label to trigger buildkite nightly test CI labels Sep 18, 2026
Signed-off-by: david6666666 <530634352@qq.com>
@david6666666 david6666666 changed the title [Bugfix][MiniMax-H3] Use Hopper-safe modulation precision [Bugfix][MiniMax-H3] Restore H100 VAE QK launch precision Sep 18, 2026
@david6666666 david6666666 added nightly-test label to trigger buildkite nightly test CI and removed nightly-test label to trigger buildkite nightly test CI labels Sep 18, 2026
This reverts commit dfc012c.

Signed-off-by: david6666666 <530634352@qq.com>
@david6666666 david6666666 changed the title [Bugfix][MiniMax-H3] Restore H100 VAE QK launch precision [Bugfix][MiniMax-H3] Use Hopper-safe modulation precision Sep 18, 2026
@david6666666 david6666666 added nightly-test label to trigger buildkite nightly test CI and removed nightly-test label to trigger buildkite nightly test CI labels Sep 18, 2026
@hsliuustc0106
hsliuustc0106 merged commit 5d3e6dc into vllm-project:main Sep 18, 2026
8 checks passed
david6666666 added a commit to david6666666/vllm-omni that referenced this pull request Sep 21, 2026
The keyframe TF32-only change still fails H100 I2VA accuracy. Remove the additional Hopper-only BF16 norm/affine rounding introduced by vllm-project#7693 while retaining the BF16 gated-residual boundary. This restores the existing fused FP32 contract on Hopper and leaves other architectures unchanged.

Add exact tests for both kernels at a BF16 halfway value: the premature cast drops the RMS epsilon and changes 1.2265625 to 1.234375. The old BF16 branch fails both tests; the restored FP32 path passes.

Signed-off-by: david6666666 <530634352@qq.com>
mlaneuville pushed a commit to mlaneuville/vllm-omni that referenced this pull request Sep 22, 2026
…ct#7693)

Signed-off-by: david6666666 <530634352@qq.com>
Signed-off-by: Matthieu Laneuville <matthieu.laneuville@surf.nl>
khairulkabir1661 pushed a commit to khairulkabir1661/vllm-omni that referenced this pull request Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightly-test label to trigger buildkite nightly test CI

Projects

None yet

4 participants