Uh oh!
There was an error while loading. Please reload this page.
feat(npu): Ascend platform, MindIE attention, and Ulysses SP for v1 - #270
Open
Chitandaaaaa wants to merge 5 commits into
Open
feat(npu): Ascend platform, MindIE attention, and Ulysses SP for v1#270Chitandaaaaa wants to merge 5 commits into
Chitandaaaaa wants to merge 5 commits into
Conversation
Add platforms registry with Ascend capability probes, extend utils/platform for npu/hccl/compile kwargs, and register a MindIE attention backend for Qwen-Image on the v1 layout. Co-authored-by: Cursor <cursoragent@cursor.com>
Bind Ascend devices before HCCL init_process_group, align/bind config.device across engine workers, and reject MindIE with ring SP. Co-authored-by: Cursor <cursoragent@cursor.com>
Use addcmul for gated residual/modulate micro-opts, and gate MindIE RoPE / layernorm_scale_shift behind USE_MINDIESD_FUSE. Co-authored-by: Cursor <cursoragent@cursor.com>
Chitandaaaaaforce-pushed
the
feat/npu-ulysses4-v1
branch
from
August 13, 2026 04:07
952d369 to
0cf05b6Compare
added 2 commits
August 13, 2026 20:28
under Ulysses SP, hiding all-to-all latency behind FA compute (compute-communication overlap). - Ulysses flow via all_to_all_4D_pre/single/after (SeqAllToAll4D). - FA_ALLTOALL_CUT/OVERLAP count semantics (0/1 off, >1 on, CUT wins): baseline single round trip; cut = head-chunked round trips; overlap = all-to-all on side stream2 overlapped with FA on main stream via npu Event/Stream sync. - current_stream refreshed at forward time. - Ulysses-only; falls back to USPAttention when not available.
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 freeto 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.
Summary
Port Ascend NPU support onto the
v1architecture (capability-level migration from fork PR #11 onmain; not a cherry-pick).platforms/(Ascend capability probes, HCCL, MindIE compile backend), extendutils/platform.pyfor NPU/HCCL/get_compile_kwargs(), and register amindieattention backend for Qwen-Image.init_process_group(HCCL), align/bindconfig.devicein engine/worker, and reject MindIE attention withring > 1.addcmulfor gated residual/modulate; gate MindIE RoPE /layernorm_scale_shiftbehindUSE_MINDIESD_FUSE=1.Commits
bf49ef1feat(npu): add Ascend platform abstraction and MindIE attention8c1e61cfeat(npu): enable Ulysses SP with CFG parallel on Ascend0cf05b6feat(npu): fuse Qwen DiT addcmul, MindIE RoPE, and LN modulateNotes
use_torch_compile=False); compile kwargs are injected only when compile is on.USE_MINDIESD_FUSEonly gates MindIE RoPE / LN fuse;addcmulis always on (generic torch op).device/device_typeis explicit.Test plan
--attn-type mindie(and without).ASCEND_RT_VISIBLE_DEVICES=0,1,2,3, Ulysses SP (sp_ulysses_degree=4,sp_ring_degree=1) + CFG parallel.USE_MINDIESD_FUSE=1for RoPE / LN fuse path.ring > 1is rejected with a clear error.