aliyun / aliyun/SimAI

TP=1,EP>1时仿真失败

Open
#298 7 comments 2 reactions 2 assignees View on GitHub

@tianhao909 is already working on this.

Since Aug 27, 2026.

  • #303 by @copilot-swe-agent — open
Dominant language
Python
Stars
1.2k
Forks
184
Avg merge
13h 4m
Merged PRs (30d)
1

Description

场景

仿真DS-V3,TP=1,EP>1

存在的问题

1.EP通信group和DP_EP通信group创建会失败,因为TP=1,TP的通信group没创建,而EP通信group和DP_EP通信group都依赖于TP
2.所有前向和后向集合通信被屏蔽

过程分析

1.break_dimension(-1) 导致维度划分异常

在 Sys::break_dimension() 中:

int Sys::break_dimension(int model_parallel_npu_group) {
  if (model_parallel_npu_group == 1) {
    return -1;  // 返回 -1
  }
  ...
}

2.decode_involved_dimensions 中所有维度被标记为 Data 维度

当 parallelismPolicy == TransformerFwdInBckwd 时:

int model_parallel_boundary = generator->break_dimension(model_parallel_npu_group); // 返回 -1
for (int i = 0; i <= -1; i++) {  // 循环不执行!model 维度全为 false
  model.push_back(true);
}
for (int i = 0; i < 10; i++) {   // 所有10个维度都被标记为 data 维度
  model.push_back(false);
  data.push_back(true);
}

结果:general_involved_dimensions["fwd"] 和 ["ig"] 全部为 false。

3.generate_collective 中跳过所有维度

在 Sys::generate_collective() 中:

for (int dim = 0; dim < topology->get_num_of_dimensions(); dim++) {
  if (topology->get_num_of_nodes_in_dimension(dim_mapper[dim]) == 1 ||
      !dimensions_involved[dim_mapper[dim]]) {
    continue;  // 所有维度都被跳过!
  }
  // ... 生成 CollectivePhase
}

由于 dimensions_involved 全为 false,所有维度都被 continue 跳过,导致 vect 为空。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.