已合并
MoeComputeExpertTokens文档更新 #5728
wuxiyuan创建于 9 天前
MoeComputeExpertTokens文档更新 #5728
已合并
wuxiyuan创建于 9 天前
wuxiyuan
9 天前

【合入来源】

如有社区issue,请关联issue链接
请勿携带内部流程信息(需求链接、问题单、内部issue等)
https://gitcode.com/Ascend/op-plugin/issues/422

【修改方案】

MoeComputeExpertTokens算子文档补充Ascend950支持

【资料变更】

修改MoeComputeExpertTokens文档中关于Ascend950支持的说明

【接口变更】

不涉及

【功能验证】

文档更新,不涉及功能验证

【CheckList】

PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 wuxiyuan 的贡献)
Wwuxiyuan
9 天前 创建了 pull request,commit 7887a9b1
atomgit-bot
atomgit-bot
9 天前 评论:

变更摘要

该 PR 是对 torch_npu.npu_moe_compute_expert_tokens 算子文档的更新,主要修正了公式描述、参数/输出约束、支持的型号以及调用示例。核心是纠正了原文档中公式的拼写错误和示例参数的取值问题,使文档与算子的实际接口约束保持一致。

主要改动

  • 修正计算公式描述: 将原公式中的 BinaerSearch 拼写修正为 BinarySearch,并将公式细化为 expertTokens_{i}=BinarySearch(sortedExpertForSourceRow,i), i in [0,numExpert)
  • 完善输入参数约束: 更新 sorted_expert_for_source_row 的语义为“每个 source row 排序后对应的专家索引”,新增输入值范围 [0, num_expert-1]、非递减顺序要求以及元素个数需小于 2^24num_expert 的取值范围更新为 (0, 2048]
  • 明确输出说明: 将 expertTokens 的 shape 明确为 [num_expert],并说明数据类型与 sorted_expert_for_source_row 保持一致。
  • 更新支持型号与约束: 约束说明中新增 Ascend 950PR/Ascend 950DT(A5) 支持该接口,支持的型号列表同步加入 Ascend 950PR/Ascend 950DT
  • 修正调用示例参数: 单算子模式和图模式示例中,sorted_experts[3,3,4,5,6,7] 改为 [0,0,0,1,1,2]num_experts5 改为 3,使其符合新的输入约束。
likedislike
atomgit-bot
atomgit-bot
9 天前 评论:

代码审查

✅ 未发现问题

likedislike
ascend-robotascend-robot成员
9 天前 添加了label:ascend-cla/yes
此处折叠了53条消息 查看更多
ascend-robot
ascend-robot成员
8 天前 评论:

The following label exists.

needs-issue: The pull request must be linked to at least one issue.

likedislike
Wwuxiyuan
8 天前 修改了pull request 的描述
ascend-robotascend-robot成员
8 天前 删除了label:needs-issue
ascend-robotascend-robot成员
8 天前 关闭了关联的issue
ascend-robotascend-robot成员
8 天前 合入了pull request