已合并
增加mselossv2损失函数核间同步 #3997
佐助大王创建于 4月20日
增加mselossv2损失函数核间同步 #3997
已合并
佐助大王创建于 4月20日
佐助大王
佐助大王成员
4月20日

描述

增加损失函数mean模式下的核间同步问题

关联的Issue

Issue #2103

测试

只增加核间同步不涉及代码逻辑问题

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 佐助大王 的贡献)
佐助大王佐助大王成员
4月20日 创建了 pull request,commit ccf68c18
佐助大王佐助大王成员
4月20日 关联了issue:[Bug-Report|缺陷反馈]:
CANN-robot
CANN-robot成员
4月20日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
loss gcw_kUomxQ2l, 陈琦 (2/2) gcw_kUomxQ2l (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

ji-songyuan, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
4月20日 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
4月20日 将crystalhu,yangyang016,fanqirui,zhou-qilong,chenqi317,liubo75,tangweiwei2,gcw_kUomxQ2l,Andy-lb,gcw_Dm2TsRUi设为评审人
CANN-robotCANN-robot成员
4月20日 将gcw_kUomxQ2l,Andy-lb,gcw_Dm2TsRUi设为审查人
CANN-robot
CANN-robot成员
4月20日 评论:

问题/功能描述

修复MSE Loss算子(V2版本)在reduction属性为mean(求平均)时,内核调度模式未正确设置的问题。该缺陷可能导致在Ascend C等特定硬件平台上,使用mean模式进行损失计算时,因调度策略不一致而影响计算的性能或正确性。

修改方案描述

在算子分片(Tiling)逻辑的GetTilingAttr函数中,添加了一行代码,确保当reduction属性为mean时,其调度模式(Schedule Mode)被设置为BATCH_MODE。此修改使mean模式与sum模式采用统一且正确的内核调度策略,消除了潜在的性能与正确性风险。

likedislike
佐助大王
佐助大王成员
4月20日 评论:

compile

likedislike
CANN-robotCANN-robot成员
4月20日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
4月20日 评论:

流水线任务触发成功
任务链接 [26ea933613d245939c27dd7b0c17155b][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Pre_Compile ✅ SUCCESS
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor ✅ SUCCESS >>>>> >>>>>
Compile_ARM_monitor ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
Smoke_A900_npupool ✅ SUCCESS >>>>>
ATK_Test_A2 ✅ SUCCESS

[2026-04-20 15:52:31]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
4月20日 评论:

流水线任务触发成功
任务链接 [500333d9bacd4a8c9ea86768bde1c544][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_style ✅ SUCCESS

[2026-04-20 15:52:00]    CI执行结束

likedislike
CANN-robotCANN-robot成员
4月20日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
4月20日 添加了label:ci-pipeline-passed
chenqi317成员
4月20日 评论:

/lgtm
/approve

likedislike
liulun0308成员
4月20日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
4月20日 添加了label:lgtmapproved
CANN-robot
CANN-robot成员
4月20日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: gcw_kUomxQ2l.
Reviewers who wrote a comment of /lgtm are: gcw_kUomxQ2l, 陈琦.

likedislike
CANN-robotCANN-robot成员
4月20日 合入了pull request