Uh oh!
There was an error while loading. Please reload this page.
feat(npu): Ascend multi-card Ulysses SP with CFG/FSDP support - #265
feat(npu): Ascend multi-card Ulysses SP with CFG/FSDP support#265Chitandaaaaa wants to merge 3 commits into
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
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
ff5e2d5 to
c3e278dComparee5a0f9e to
4a9cd33CompareAdapt 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>
4a9cd33 to
ef35998Compare| for cfg_ranks in cfg_groups: | ||
| group = dist.new_group(cfg_ranks) | ||
| if rank in cfg_ranks: | ||
| PROCESS_GROUP.CFG_GROUP = dist.new_group(cfg_ranks) |
There was a problem hiding this comment.
每个 rank 都按相同顺序 new_group,再决定是否赋值给 PROCESS_GROUP。这是 PyTorch 官方对 torch.distributed.new_group 的硬性约定,不是 HCCL 单独发明的规则。
出处:torch.distributed.new_group
原文:
This function requires that all processes in the main group (i.e. all processes that are part of the distributed job) enter this function, even if they are not going to be members of the group. Additionally, groups should be created in the same order in all processes.
HCCL 对此更严格。
| device_mesh: DeviceMesh, | ||
| parallelize_plan: Optional[Union[ParallelStyle, Dict[str, ParallelStyle]]] = None, | ||
| ): | ||
| # TP relies on a private torch API removed in PyTorch >= 2.9; adapt separately later. |
There was a problem hiding this comment.
高版本目前没有可以替代的方法,目前只是校验,高版本把该私有方法合并了,暂时没有暴露类似的api,暂时规避,后续是否可以考虑删除。
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>
Summary
ParallelWrapperon NPU (HCCL).SeqAllToAll+ MindIE attention (attn_impl=mindie/ auto on NPU).dist.new_group(required by HCCL).ring_degree > 1is still unsupported on NPU.