Skip to content

test: define Wan fused BF16 parity budget - #8188

Merged
yenuo26 merged 3 commits into
vllm-project:mainfrom
andyluo7:fix/wan-bf16-fastpath-parity
Sep 29, 2026
Merged

yenuo26 merged 3 commits into
vllm-project:mainfrom
andyluo7:fix/wan-bf16-fastpath-parity

Conversation

@andyluo7

@andyluo7 andyluo7 commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • keep exact parity for the non-fused path and FP32 fused path
  • validate the BF16 fused path with explicit maximum-error and RMS-error budgets
  • retain the same checks for both local and two-rank sharded decoding

Root cause

FusedWanRMSNormSiLU returns BF16 activations immediately, while the eager Wan norm keeps its affine and SiLU result in FP32 until the following convolution rounds it. Requiring bit identity, or a generic elementwise relative tolerance near zero, treats that intentional precision boundary as a regression.

Across repeated AMD failures the observed maximum absolute errors were 0.0195 and 0.0273. The new contract caps the worst output error at four BF16 epsilons (0.03125) and the whole-output RMS error at one BF16 epsilon (0.0078125). Decoder outputs are tanh-bounded to [-1, 1], so these absolute limits are directly interpretable.

Examples:

Validation

Signed-off-by: andyluo7 andy.luo@amd.com

Signed-off-by: andyluo7 <andy.luo@amd.com>
@andyluo7

Copy link
Copy Markdown
Collaborator Author

Self-review: I checked the current 6f48d7d7 patch against current main. Exact parity is still required for the exact path, and FP32 fused parity remains tight. Only the BF16 fused path uses the explicit error budget, matching its intentional extra cast boundary; both max-error and RMS-error assertions prevent a broad tolerance from hiding widespread drift. py_compile and git diff --check pass. Exact-head AMD runtime validation is requested.

@andyluo7 andyluo7 added the ready label to trigger buildkite CI label Sep 27, 2026
@vllm-omni-review-bot

Copy link
Copy Markdown

This PR appears to be related to model: Wan.

Model owners: @bjf-frz @NickCao @yenuo26

Routing: @bjf-frz via semantic router, model owner; @NickCao via CODEOWNERS; @yenuo26 via CODEOWNERS

@andyluo7, 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.

@vllm-omni-review-bot

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

Copy link
Copy Markdown

Omni ReviewBot triage note

Automated triage of commit b34e9bfb5e45 produced:

  • Priority: high. Prompt maintainer attention is suggested.

These are automated triage suggestions only — the final decision belongs to the maintainers.

Signed-off-by: andyluo7 <andy.luo@amd.com>
@andyluo7 andyluo7 added ready label to trigger buildkite CI and removed ready label to trigger buildkite CI labels Sep 27, 2026
@vllm-omni-review-bot

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

Copy link
Copy Markdown

Omni ReviewBot: superseded

The CI failure noted on d37f77f62950 refers to an earlier head; the pull request now points at b34e9bfb5e45.

@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot routing record

Assigned Strict under experiment vllm-omni-strict-5050-20260829.

@vllm-omni-review-bot vllm-omni-review-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omni ReviewBot review

PR description

This pull request changes only the Wan decoder CPU fast-path test. The exact streaming path still has to match the untouched decoder bit-for-bit, and the fused path in FP32 still uses a tight assert_close. Under BF16 autocast, fused outputs are now judged by a pair of absolute budgets: worst-element error at four BF16 epsilons and whole-tensor RMS error at one BF16 epsilon, instead of a generic allclose. The same fused check is used for the local decoder and the two-rank gloo shard.

Change flow

flowchart TD
  A["[EXISTING] WanStreamingDecoder CPU chunks"]:::existing
  B["[EXISTING] install_wan_decoder_fast_path exact/fused"]:::existing
  C["[CHANGED] _check_pair local and 2-rank compare"]:::changed
  D["[NEW] _assert_fused_output_close BF16 max+RMS budget"]:::new
  E["[EXISTING] exact torch.equal; FP32 fused assert_close"]:::existing
  A --> B --> C
  C -->|"fused bf16"| D
  C -->|"exact / fused fp32"| E
  classDef existing fill:#e5e7eb,stroke:#6b7280,color:#111827
  classDef changed fill:#fef3c7,stroke:#d97706,color:#451a03,stroke-width:2px
  classDef new fill:#dcfce7,stroke:#16a34a,color:#052e16,stroke-width:2px
  classDef removed fill:#fee2e2,stroke:#dc2626,color:#450a0a,stroke-width:2px
Loading

CI at d37f77f62950 (2026-09-27T20:39:55.130997+00:00): required check(s) blocking: buildkite/vllm-omni (failed), and -5 more. Observed Buildkite: buildkite/vllm-omni-amd-ci (failed), buildkite/vllm-omni-npu-ci (passed), buildkite/vllm-omni (failed), and 1 more.

No actionable findings.

@hsliuustc0106

Copy link
Copy Markdown
Collaborator

CI failed

@andyluo7 andyluo7 added ready label to trigger buildkite CI and removed ready label to trigger buildkite CI labels Sep 28, 2026
@andyluo7

andyluo7 commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Fresh exact-head CI after syncing with current main (including merged #8166): b34e9bfb5e45648b7f92d1031ab66372f2035db0.

Wan BF16 validation passed on AMD build #12898:

  • test_fused_level_plumbing_on_cpu[True-RMSNormVAE] passed in Simple Diffusion shard 1.
  • test_fused_level_plumbing_on_cpu[True-default] passed in shard 2.
  • test_sharded_fast_path_on_every_rank[True-fused] passed in shard 3.
  • The dedicated Diffusion · Wan22 Test passed.
  • The previous Hunyuan LoRA TP=1/2/4 failures are gone after test: keep Hunyuan LoRA CPU path on native linear #8166.

The AMD aggregate is red only for failures outside this one-file Wan test diff:

All other required checks passed: generic Buildkite #16263, Intel #9220, NPU #7984, pre-commit/Ruff, both wheel builds, DCO, and docs.

There are no failures attributable to #8188. The remaining gates are the known #8165 baseline/routing dependency and maintainer approval.

@yenuo26 yenuo26 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yenuo26
yenuo26 merged commit f145f66 into vllm-project:main Sep 29, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants