Repository navigation
Conversation
…-Omni Optimize single-card and multi-card Ascend NPU execution paths under strict BF16 model-level CPU offload parity: - Promote eligible eager non-causal TORCH_SDPA calls on Ascend NPU to MindIE-SD attention when installed, and propagate set_attention_config to both SelfAttention and CrossAttention instances in WanModel - Add step-scoped static text-embedding and CrossAttention K/V caching in WanModel/TI2VDenoisingStage across denoising steps, cleared automatically on stage exit and model offload - Pre-unsqueeze 4D RoPE cos/sin once per block stack on NPU and add a zero-allocation fast path in _apply_rotary_emb_npu - Fuse DiTBlock and Head scale/shift modulation via torch.addcmul on NPU - Dispatch WanTextEncoder GELU and T5LayerNorm to native NPU kernels - Eliminate O(T^2) frame concatenation in Wan22VideoVAE.decode and FP32 nearest-neighbor upsample round-trips on NPU Verified with unit tests in tests/unit/ops/test_attention_backends.py and tests/unit/ops/test_npu_optimizations.py.
…rformance board
Add reproducible five-gate (G0-G4) Ascend NPU qualification harness under
benchmarks/ascend_npu/, sanitized head-to-head benchmark records across 1x,
2x, 4x, and 8x Ascend 910B2 (64GB) vs. vLLM-Omni v0.34.0, and bilingual
MkDocs pages (docs/{en,zh}/benchmark_ascend_npu.md) enforcing explicit chip
SKU and card-count reporting with zero host metadata leakage.
12 tasks done
This branch has not been deployed
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.
Description
Accelerates Wan2.2-TI2V-5B inference on Huawei Ascend 910B2 (64GB) (
x86_64· CANN9.3.0·quay.io/ascend/vllm-omni:v0.34.0base) across 1×, 2×, 4×, and 8× cards to surpass vLLM-Omniv0.34.0at every card count, and introduces a reproducible five-gate (G0–G4) Ascend NPU Qualification Suite & Bilingual Performance Board underbenchmarks/ascend_npu/anddocs/{en,zh}/benchmark_ascend_npu.md.Motivation
1× Ascend 910B2 64GBwith BF16 model CPU offload) and multi-card (2× / 4× / 8×)Wan2.2-TI2V-5Blatency strictly belowvLLM-Omni v0.34.0on an identical container base without lossy feature caching or quantization.G0–G4, including zero-mountenv -iclean-room reproduction) and CI-enforced benchmark board that explicitly distinguishes Ascend 910B2 (64GB) vs. Ascend 910B4 (32GB) SKUs and exact accelerator counts while blocking any host/cluster metadata leakage.Type of Change
Changes Made
telefuser/ops/,telefuser/models/wan_*.py,ti2v_denoising.py)TORCH_SDPAcalls on Ascend NPU toMINDIE_ATTNwhenmindiesdis installed, and propagateset_attention_configto bothSelfAttentionandCrossAttentioninWanModel.CrossAttentionK/V caching across denoising steps (automatically cleared on stage exit andoffload_device).cos/sinonce per block stack on NPU with a zero-allocation_apply_rotary_emb_npufast path, fuseDiTBlock/Headscale-shift modulation viatorch.addcmul, dispatchWanTextEncoderGELU /T5LayerNormto native NPU kernels, and eliminateO(T^2)frame concatenation inWan22VideoVAE.decode.benchmarks/ascend_npu/,docs/{en,zh}/benchmark_ascend_npu.md,mkdocs.yml)preflight_check.sh,comm_probe.py(G0),bench_vs_vllm_omni.py(G1–G3),cleanroom_repro.sh(G4), andrender_board.pywith strict hardware-SKU validation and zero-leakage sanitization checks.1× / 2× / 4× / 8× Ascend 910B2 (64GB)head-to-head records forWan2.2-TI2V-5Band planned qualification slots forMiniMax-H3.Performance Impact
Measured on Ascend 910B2 (64GB) (
x86_64, CANN9.3.0, sharedquay.io/ascend/vllm-omni:v0.34.0runtime), Wan2.2-TI2V-5B (864×480,121frames,50-step UniPC,CFG=5.0, pureBF16),1 Cold + 3 Warmserial requests:v0.34.0Warm (DiT)Testing
pytest tests/unit/benchmarks/test_ascend_npu_board.py tests/unit/ops/test_npu_optimizations.py tests/unit/ops/test_attention_backends.py)G0–G4hardware qualification across1× / 2× / 4× / 8×Ascend 910B2)benchmarks/ascend_npu/render_board.py&python scripts/docs/prepare_cookbook.py build)Checklist
ruff check,ruff format --check,ruff check --select I)pytest&tests/docs)docs/en/,docs/zh/,benchmarks/ascend_npu/README.md)[TYPE] Brief descriptionRelated Issues
Related to #52