feat(npu): enable multi-card ParallelWrapper on Ascend - #11
Open
Chitandaaaaa wants to merge 3 commits into
Open
Conversation
1. Add NPU 950 platform abstraction layer with device registry and auto_detect_device 2. Support mindiesd_attention and mindiesd_compile with capability detection and compile_backend 3. Adapt Qwen-Image model to use platform compile kwargs and NPU attention backend
Chitandaaaaa
force-pushed
the
feat/npu-ulysses4-main
branch
4 times, most recently
from
July 30, 2026 12:38
e5a0f9e to
4a9cd33
Compare
Adapt ParallelWrapper for multi-card Ascend (HCCL/FSDP), route long-context attention through SeqAllToAll + MindIE, and align config.device at parallel load entry while workers bind rank-local devices. Co-authored-by: Cursor <cursoragent@cursor.com>
Chitandaaaaa
force-pushed
the
feat/npu-ulysses4-main
branch
from
July 31, 2026 01:50
4a9cd33 to
ef35998
Compare
Combine addcmul gated residual/modulate micro-opts with MindIE-SD RMSNorm/RoPE fuse and layernorm_scale_shift under USE_MINDIESD_FUSE. Co-authored-by: Cursor <cursoragent@cursor.com>
Chitandaaaaa
pushed a commit
that referenced
this pull request
Aug 12, 2026
Add platforms abstraction with Ascend capability probes, extend utils/platform for npu/hccl/compile kwargs, and register a MindIE attention backend so PR #11 commit1 behavior can land on v1 layout. Co-authored-by: Cursor <cursoragent@cursor.com>
Chitandaaaaa
pushed a commit
that referenced
this pull request
Aug 12, 2026
Port PR #11 commit3 micro-opts onto v1 transformer_qwenimage and MindIE attention kwargs; MindIE RoPE/LN fuse gated by USE_MINDIESD_FUSE. Co-authored-by: Cursor <cursoragent@cursor.com>
Open
5 tasks
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.
Summary
utils/platform.py(is_npu_available, HCCL backend, set/sync/empty_cache).ParallelWrapper/_worker_loopwith an NPU+HCCL path for multi-card Ulysses SP via built-inmp.spawn.device_type="npu"is explicit).Test plan
parallelism>1path still uses CUDA/NCCL (no behavior change).ASCEND_RT_VISIBLE_DEVICES=0,1,2,3withparallelism=4, sp_ulysses_degree=4, sp_ring_degree=1.device="cuda"is rewritten tonpu:{rank}inside NPU workers only.Made with Cursor