Skip to content

[None][perf] Wan 2.2: FP8 attention routing and static-FP8 block fusions on Rubin - #20836

Open
wu6u3tw wants to merge 3 commits into
NVIDIA:mainfrom
wu6u3tw:wan22-rubin-fused-fp8-part2
Open

wu6u3tw wants to merge 3 commits into
NVIDIA:mainfrom
wu6u3tw:wan22-rubin-fused-fp8-part2

Conversation

@wu6u3tw

@wu6u3tw wu6u3tw commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part 2 of Wan 2.2 fused fp8 on Rubin (SM107). Part 1 (#20005, merged) added the ops. This PR uses them in VisualGen attn and the Wan block. No env vars; each fusion is picked only when its conditions hold, otherwise current code runs.

3 commits, review in order:

1. fp8 ops

  • trtllm::fused_residual_norm_quant: gated residual + LayerNorm / AdaLN + static fp8 quant in one row kernel. hidden any multiple of 1024 up to 8192.
  • cublas_scaled_mm: bias / gelu epilogues and e4m3 output, through CublasMMWrapper (epilogue, D scale, separate D layout setters). defaults unchanged.
  • fused_dit_qk_norm_rope_fp8_supported: support query for the fp8 qk prep.

2. fp8 attn

  • DenseFp8Attention in visual_gen/attention/backends/dense_fp8.py: per-tensor fp8 self-attn on trtllm::fmha_dense_fp8. the VisualGen TRTLLM backend builds it for layers with a per-tensor fp8 quant_attention_config on SM107 (MHA, no sparse). shared FMHA code (_torch/attention/) untouched.
  • bf16 q/k/v: quantized per tensor. pre-quantized e4m3 q/k/v (softmax scale in q/k): bf16 or e4m3 out, kernel probed per out dtype at init.
  • self-attn: fused qk norm + rope + fp8 quant, e4m3 q/k/v go straight to the kernel. Ulysses: fp8 q/k/v through all-to-all, one V scale per group.
  • cross-attn and Attention2D / Ring run the same recipe on cuDNN fp8 on SM107, PrimTS on or off. masked cross-attn on VANILLA.
  • fix cuDNN LSE layout to [B, H, S]. Attention2D / Ring merge in this layout, so cuDNN + Attention2D / Ring gives wrong output on main today (bf16 too).
  • AttentionConfig accepts the per-tensor fp8 recipe for TRTLLM on SM107.

3. static fp8 Wan block (opt-in, WanPipeline pipeline_config enable_fp8_block_fusions, default off)

  • Linear / MLP: bias + gelu fused into the fp8 GEMM, fp8 output feeds the next GEMM. off for row-parallel TP partial outputs.
  • WanBlock.plan_fp8_fusions() turns these on after weight load when every site qualifies. TP, per-token temb, async Ulysses and VSA keep current code, with one warning listing reasons and block counts.
  • pipeline_config bool keys must be bools.
  • docs: key scope (T2V WanPipeline only; I2V / FastWan reject it) and the validated setup (SM107, Wan 2.2 A14B static fp8, per-tensor fp8 attn). other GPUs / bf16 attn run but are unit-test covered only.

not in this PR: Attention2D on the dense fp8 kernels (needs LSE), Ulysses comm overlap, cross-block AdaLN handoff, _forward_fp8 restructure of the block forward.

Test Coverage

  • test_wan_fp8.py: dense fp8 attn vs SDPA / cuDNN fp8, fp8 producer (eager, compile), DenseFp8Attention rules and routing (cpu), fused vs unfused block with distinct per-Linear scales and gates near 1, state_dict unchanged after planning, compile, planner rejections, enable_fp8_block_fusions parsing (cpu).
  • multi_gpu/test_ulysses_attention.py (fp8 section): Ulysses U2 / U4 vs single GPU, CUDA graph replay, Attention2D on cuDNN fp8.
  • multi_gpu/test_attn2d_attention.py, multi_gpu/test_ring_attention.py: bf16 cuDNN inner backend vs SDPA (Attention2D 2x2 / 4x1, Ring). 2x2 and Ring fail on main without the LSE fix.
  • kernels/parallel/test_fused_dit_qk_norm_rope_fp8.py: row kernel vs torch, supported widths, fake op under compile.
  • kernels/parallel/test_scaled_mm.py (epilogue): bias / gelu x bf16 / e4m3 vs torch.
  • test_attention_cudnn.py: LSE layout. test_visual_gen_args.py: SM107 recipes.
  • lists: l0_gr100, l0_b200, l0_cpu; multi-GPU files already in l0_dgx_b200. ran on Rubin, 1 and 4 GPUs.

Dev Engineer Review

  • The change adds per-tensor FP8 attention routes, residual/norm/quantization kernels, and optional FP8 Wan block fusions. enable_fp8_block_fusions defaults to off.
  • The cublas_scaled_mm API adds cuBLASLt epilogues and optional output scaling. Check that callers, registered schemas, and fake operators agree, especially when E4M3 output requires d_scale.
  • FP8 attention routes depend on device and backend support. Async Ulysses and several Wan configurations retain existing paths. Verify fallback selection, scale handling, and output layouts.
  • The cuDNN LSE layout changes to [B, H, S_q]. Verify all consumers that merge attention results use this layout.
  • The merge-base diff changes 29 files (+2,394/-39). Current-head build, test, and CI results are not available.

QA Engineer Review

  • The test changes cover scaled-GEMM epilogues and invalid arguments; fused QK norm/RoPE and residual-norm quantization; FP8 Ulysses, Attention2D, and CUDA graph replay; cuDNN LSE shape; and Wan FP8 attention, block fusions, compilation, and configuration.
  • Added test functions include test_fp8_scaled_mm_epilogue, test_fp8_scaled_mm_epilogue_rejects_bad_arguments, test_residual_norm_quant_matches_reference, test_ulysses_fp8_matches_single_gpu, test_ulysses_fp8_cuda_graph_replay, and test_attn2d_fp8_runs_on_cudnn. Wan tests also cover fused blocks, attention, and pipeline configuration.
  • l0_cpu.yml adds test_wan_fp8.py. l0_gr100.yml adds test_wan_fp8.py, the fused QK norm/RoPE test file, and test_scaled_mm.py -k "epilogue". The modified Ulysses and cuDNN tests are present in the existing l0_dgx_b200 and l0_b200 lists. No manual-QA list changes appear in this diff.
  • Coverage verdict: needs follow-up. Several tests require supported GPUs, SM versions, or distributed execution. Current-head test results are not available.

Per-File QA Perspective

  • cpp/tensorrt_llm/kernels/fusedResidualNormQuantKernel.cu: Verify residual, LayerNorm, and AdaLayerNorm variants, optional inputs, hidden-size limits, and zero-row behavior.
  • cpp/tensorrt_llm/kernels/fusedResidualNormQuantKernel.h: Verify declared parameter shapes and modes match kernel validation and output behavior.
  • cpp/tensorrt_llm/thop/CMakeLists.txt: Verify the new operator source is included in the intended build target.
  • cpp/tensorrt_llm/thop/cublasScaledMM.cpp: Verify epilogue selection, scale requirements, dtype handling, and cuBLASLt algorithm selection. test_scaled_mm.py covers epilogue cases and is listed in l0_gr100 with an epilogue selector.
  • cpp/tensorrt_llm/thop/cublasScaledMM.h: Verify the new default arguments match the registered operator and its callers.
  • cpp/tensorrt_llm/thop/fusedDiTQKNormRopeFp8Op.cpp: Verify the support query matches actual device and layout support.
  • cpp/tensorrt_llm/thop/fusedResidualNormQuantOp.cpp: Verify PyTorch-side validation and empty-tensor returns match each kernel mode.
  • tensorrt_llm/_torch/attention/backends/fmha/interface.py: Verify backends handle the prequantized-FP8 capability and method contract.
  • tensorrt_llm/_torch/attention/backends/fmha/registry.py: Verify registration order preserves intended backend precedence.
  • tensorrt_llm/_torch/attention/backends/fmha/trtllm_gen_dense_fp8.py: Verify support gates, Q/K/V scaling, output scaling, and rejection of unsupported request shapes. Wan FP8 tests cover dense and prequantized attention; test_wan_fp8.py is listed in l0_gr100 and l0_cpu.
  • tensorrt_llm/_torch/custom_ops/cpp_custom_ops.py: Verify fake operator outputs and optional arguments match the real operators during compilation.
  • tensorrt_llm/_torch/modules/linear.py: Verify static-FP8 epilogue eligibility and forward_without_bias, including output-reduction cases.
  • tensorrt_llm/_torch/modules/mlp.py: Verify fused GELU eligibility and defer_down_bias, including the LoRA error path.
  • tensorrt_llm/_torch/visual_gen/attention/attention.py: Verify fused-QKV eligibility, deferred output bias, and fallback behavior for cross-attention and extra arguments. Wan FP8 tests cover attention output and routing.
  • tensorrt_llm/_torch/visual_gen/attention/backends/cudnn.py: Verify LSE consumers use [B, H, S_q]. The modified cuDNN test is listed in l0_b200.
  • tensorrt_llm/_torch/visual_gen/attention/backends/interface.py: Verify backend FP8 capabilities, V-amax handling, and unsupported default behavior.
  • tensorrt_llm/_torch/visual_gen/attention/backends/parallel.py: Verify FP8 all-to-all exchange and V-amax reduction for supported world sizes. The modified Ulysses test is listed in l0_dgx_b200.
  • tensorrt_llm/_torch/visual_gen/attention/backends/trtllm.py: Verify FP8 library selection and prequantized tensor reshaping.
  • tensorrt_llm/_torch/visual_gen/models/wan/pipeline_wan.py: Verify enable_fp8_block_fusions defaults to off and pipeline overrides reach model configuration. Related tests are listed in l0_cpu and l0_gr100.
  • tensorrt_llm/_torch/visual_gen/models/wan/transformer_wan.py: Verify fusion gates and fused results against the unfused path. Wan fusion tests are in test_wan_fp8.py, listed in l0_cpu and l0_gr100.
  • tensorrt_llm/_torch/visual_gen/models/wan/utils_wan.py: Verify mode selection, row reshaping, and optional residual and normalization outputs.
  • tensorrt_llm/visual_gen/args.py: Verify the SM107 dense-FP8 recipe is accepted only for supported configurations.
  • tests/integration/test_lists/test-db/l0_cpu.yml: Adds test_wan_fp8.py to the CPU test list.
  • tests/integration/test_lists/test-db/l0_gr100.yml: Adds the fused QK norm/RoPE test file and test_wan_fp8.py; adds the scaled-MM epilogue selector.
  • tests/unittest/_torch/kernels/parallel/test_scaled_mm.py: Adds scaled-MM epilogue output and invalid-argument tests. The epilogue selector is in l0_gr100.
  • tests/unittest/_torch/visual_gen/kernels/parallel/test_fused_dit_qk_norm_rope_fp8.py: Adds residual-norm-quant reference, support-boundary, CPU-scale rejection, and compile tests. The file is listed in l0_gr100.
  • tests/unittest/_torch/visual_gen/multi_gpu/test_ulysses_attention.py: Adds FP8 Ulysses reference, graph-replay, and Attention2D cuDNN tests. The file is listed in l0_dgx_b200.
  • tests/unittest/_torch/visual_gen/test_attention_cudnn.py: Updates the LSE shape expectation and retains cuDNN attention coverage. The file is listed in l0_b200.
  • tests/unittest/_torch/visual_gen/test_wan_fp8.py: Adds Wan block-fusion, dense/prequantized attention, compilation, fallback, and pipeline-configuration tests. The file is listed in l0_cpu and l0_gr100.

@wu6u3tw

wu6u3tw commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79985 [ run ] triggered by Bot. Commit: 685f1ca Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79985 [ run ] completed with state FAILURE. Commit: 685f1ca
/LLM/main/L0_MergeRequest_PR pipeline #65833 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@wu6u3tw
wu6u3tw force-pushed the wan22-rubin-fused-fp8-part2 branch from 685f1ca to 4e80131 Compare October 26, 2026 18:02
@wu6u3tw

wu6u3tw commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@wu6u3tw
wu6u3tw force-pushed the wan22-rubin-fused-fp8-part2 branch from 4e80131 to fe23c60 Compare October 26, 2026 23:38
@wu6u3tw

wu6u3tw commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@wu6u3tw
wu6u3tw force-pushed the wan22-rubin-fused-fp8-part2 branch from fe23c60 to 18c66a1 Compare October 27, 2026 19:40
@wu6u3tw

wu6u3tw commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80963 [ run ] triggered by Bot. Commit: 18c66a1 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #80963 [ run ] completed with state FAILURE. Commit: 18c66a1
/LLM/main/L0_MergeRequest_PR pipeline #66685 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@wu6u3tw
wu6u3tw force-pushed the wan22-rubin-fused-fp8-part2 branch from 18c66a1 to 4c9e660 Compare October 28, 2026 00:17
@wu6u3tw

wu6u3tw commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81007 [ run ] triggered by Bot. Commit: 4c9e660 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81007 [ run ] completed with state FAILURE. Commit: 4c9e660
/LLM/main/L0_MergeRequest_PR pipeline #66725 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Either:

  • Wait for the PR to be fully approved — the label is added automatically once approval is complete. Having unresolved open comments is fine, or
  • If needed, ask a member of NVIDIA/trt-llm-ci-approvers to add the label manually.
    Then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@wu6u3tw
wu6u3tw force-pushed the wan22-rubin-fused-fp8-part2 branch from 4c9e660 to c07064e Compare October 30, 2026 17:15
@wu6u3tw

wu6u3tw commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81720 [ run ] triggered by Bot. Commit: c07064e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81720 [ run ] completed with state FAILURE. Commit: c07064e
/LLM/main/L0_MergeRequest_PR pipeline #67379 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Either:

  • Wait for the PR to be fully approved — the label is added automatically once approval is complete. Having unresolved open comments is fine, or
  • If needed, ask a member of NVIDIA/trt-llm-ci-approvers to add the label manually.
    Then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@wu6u3tw

wu6u3tw commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@wu6u3tw
wu6u3tw force-pushed the wan22-rubin-fused-fp8-part2 branch from c07064e to 4d1031d Compare November 6, 2026 01:15
@wu6u3tw

wu6u3tw commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #82943 [ run ] triggered by Bot. Commit: 4d1031d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #82943 [ run ] completed with state FAILURE. Commit: 4d1031d
/LLM/main/L0_MergeRequest_PR pipeline #68501 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@wu6u3tw
wu6u3tw force-pushed the wan22-rubin-fused-fp8-part2 branch from 4d1031d to 271ac69 Compare November 6, 2026 04:14
@wu6u3tw

wu6u3tw commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #86457 [ run ] completed with state SUCCESS. Commit: 69673b8
/LLM/main/L0_MergeRequest_PR pipeline #71649 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@@ -0,0 +1,257 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

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.

@yuxianq Could you help review this part or suggest someone who could? thanks

Comment thread docs/source/models/visual-generation.md Resolved
@wu6u3tw
wu6u3tw force-pushed the wan22-rubin-fused-fp8-part2 branch 2 times, most recently from e7e4b6c to d7af346 Compare November 23, 2026 22:08
@wu6u3tw

wu6u3tw commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #86814 [ run ] triggered by Bot. Commit: d7af346 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #86814 [ run ] completed with state SUCCESS. Commit: d7af346
/LLM/main/L0_MergeRequest_PR pipeline #71980 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@zhenhuaw-me
zhenhuaw-me requested review from a team and zhenhuaw-me November 24, 2026 09:26
@wu6u3tw

wu6u3tw commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #87018 [ run ] triggered by Bot. Commit: d7af346 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #87018 [ run ] completed with state SUCCESS. Commit: d7af346
/LLM/main/L0_MergeRequest_PR pipeline #72174 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Either:

  • Wait for the PR to be fully approved — the label is added automatically once approval is complete. Having unresolved open comments is fine, or
  • If needed, ask a member of NVIDIA/trt-llm-ci-approvers to add the label manually.
    Then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@github-actions

Copy link
Copy Markdown

Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements.

# availability rules (SM, sparse layers) also cover this path.
self._prequantized_fp8_lib: Optional[Fmha] = None
if is_per_tensor_fp8(quant_attention_config):
self._prequantized_fp8_lib = next(

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.

If TrtllmGenDenseFp8Fmha is only used here, and there will not be other fmha libs support prequantized_fp8, why do we add TrtllmGenDenseFp8Fmha to fmha_libs and extract it here? Can we directly use it here or even declare it inside visual_gen? Then we don't need to modify the shared interface.py and registry.py.

"""
return False

def run_prequantized(

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.

Don't need a new interface, we can reuse the existed forward, just add v_descale to AttentionForwardArgs, other arguments can be parsed from existed q/k/v/metadata/forward_args.

"""
return True

def supports_prequantized_fp8(self, fp8_output: bool = False) -> bool:

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.

We prefer to use class variable supports_prequantized_fp8 instead. If you need more complex check method, define it for supports_prequantized_fp8=True fmha libs only instead of in the shared interface.

@yuxianq yuxianq 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.

Please reconsider the design of TrtllmGenDenseFp8Fmha as I commented above.

…as_scaled_mm epilogues

- trtllm::fused_residual_norm_quant: gated residual x + gate * (y + bias),
  then LayerNorm / AdaLN and static FP8 quantization in one row kernel; hidden
  any multiple of 1024 up to 8192, device and argument checks.
- cublas_scaled_mm: bias / GELU epilogues and e4m3 output (d_scale) through
  CublasMMWrapper (epilogue, D scale and separate D layout setters; tuned LUT
  only for bf16 outputs without GELU). Defaults unchanged.
- fused_dit_qk_norm_rope_fp8_supported: support query for the FP8 QK norm +
  RoPE producer.
- Tests: row kernel vs torch, supported widths, fake op under compile; GEMM
  epilogues vs torch (bias / GELU x bf16 / e4m3).

Signed-off-by: Tin-Yin Lai <[email protected]>
…-gen dense FP8 kernels

- VisualGen DenseFp8Attention (visual_gen/attention/backends/dense_fp8.py):
  dense, per-tensor FP8 self-attention on trtllm::fmha_dense_fp8. Built by
  the VisualGen TRTLLM backend for layers with a per-tensor FP8
  quant_attention_config on SM107; MHA only, no sparse layers. Shared FMHA
  code is unchanged.
- BF16 Q/K/V are quantized per tensor; pre-quantized e4m3 Q/K/V with the
  softmax scale folded into Q/K take the FP16-softmax kernels, BF16 or e4m3
  output, probed per output dtype at construction.
- Self-attention: fused QK norm + RoPE + FP8 quantization hands e4m3 Q/K/V to
  the kernel; Ulysses moves them through the all-to-all with one V scale per
  group.
- Cross-attention and Attention2D / Ring run the same recipe on cuDNN FP8
  (masked cross-attention on VANILLA).
- cuDNN forward_with_lse returns the LSE as [B, H, S], the layout the
  Attention2D / Ring merges read.
- AttentionConfig accepts the per-tensor FP8 recipe for TRTLLM on SM107.
- Tests: Ulysses FP8 vs one GPU and CUDA graph replay, BF16 cuDNN under
  Attention2D (2x2, 4x1) and Ring vs SDPA, LSE layout, recipe validation.

Signed-off-by: Tin-Yin Lai <[email protected]>
…e_fp8_block_fusions)

- Linear / MLP: bias and GELU in the FP8 GEMM epilogue, FP8 output into the
  next GEMM; off for row-parallel TP partial outputs.
- WanBlock.plan_fp8_fusions() enables them after weight load when every site
  qualifies: residual + norm + FP8 quantization in the row kernel, biases in
  epilogues or the next row kernel, FFN GELU with FP8 output, FP8 attention
  output into to_out. Other configurations keep the existing path; with the
  key on, a warning lists the reasons and block counts.
- WanPipeline key enable_fp8_block_fusions (default false); pipeline_config
  bool keys must be bools.
- Docs: the key, its scope (WanPipeline) and the validated setup.
- Tests: dense FP8 attention and routing, fused vs unfused block with
  distinct per-Linear scales, compile, planner rejections, config keys.

Signed-off-by: Tin-Yin Lai <[email protected]>
@wu6u3tw
wu6u3tw force-pushed the wan22-rubin-fused-fp8-part2 branch from d7af346 to 012a157 Compare November 26, 2026 01:00
@wu6u3tw

wu6u3tw commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #87313 [ run ] triggered by Bot. Commit: 012a157 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #87313 [ run ] completed with state SUCCESS. Commit: 012a157
/LLM/main/L0_MergeRequest_PR pipeline #72444 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.