已关闭
[CT][MS][OPS][nn.rmseloss][function][全量]rmseloss ascend pynative模式bool类型校验丢失 #209
tanxinglian创建于  2025年2月25日关闭于  2025年3月19日
tanxinglian
2025年2月25日 创建

1.Describe the current behavior / 问题描述 (Mandatory / 必填)

样例: (根据实际修改和增删)

rmseloss ascend pynative模式bool类型校验丢失

2.Environment / 环境信息 (Mandatory / 必填)

  • Hardware Environment / 硬件环境(Mandatory / 必填):
    Hardware (e.g.Ascend910B1/Mac CPU)

    样例:

后端类型 硬件具体类别
Ascend 910B1
Ascend 910A
  • Software Environment / 软件环境 (Mandatory / 必填):

    bugfix版本问题引入样例:(根据实际修改和增删)

Software Version(根据实际修改,必填)
MindSpore 2.22号包 mindspore_commit=commit_id = '[sha1]:b13f4cb7,[branch]:(HEAD,origin/master,origin/HEAD,master)'(失败)2.6.0 B021 mindspore_commit=commit_id = '[sha1]:747d2b44,[branch]:(HEAD,origin/master,origin/HEAD,master)'(成功)
CANN Milan_C20/20241231(成功) Milan_C20/20241231(失败)
Python Python 3.10.2
OS platform eulerosv2r10
GCC/Compiler version 7.3

3.Related testcase / 关联用例 (Mandatory / 必填)

  • Testcase Name/ 用例名 (Mandatory / 必填):
    -- Testcase Name(e.g.test_mf_llama_7b_wiki4096_train_cell_dp1mp4pp4mb4_910_16p_0005): test_n_rmseloss_input_3x7x2x9_dtype_error_bool
  • Excute Mode / 执行模式 (Mandatory / 必填):
    -- Excute Mode(e.g., Graph\PyNative): PyNative
    -- Excute Mode(e.g., O0\O1\O2):910b:O0 910A和CPU:不设置

4.Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

(1)export CONTEXT_DEVICE_TARGET=Ascend
export CONTEXT_MODE=PYNATIVE_MODE
export MS_DISABLE_KERNEL_BACKOFF=1
export CONTEXT_JIT_LEVEL=O0
(2)cd MindSporeTest/operations
(3)pytest -s -v test_n_rmseloss.py::test_n_rmseloss_input_3x7x2x9_dtype_error_bool

5.Describe the expected behavior / 预期结果 (Mandatory / 必填)

【预期结果】:用例执行成功 预期报错TypeError: For primitive[Sub], the input argument[x] must be a type of {Tensor[BFloat16], Tensor[Float16], Tensor[Float32], Tensor[Float64], Tensor[Int16], Tensor[Int32], Tensor[Int64], Tensor[Int8], Tensor[UInt16], Tensor[UInt32], Tensor[UInt64], Tensor[UInt8]}, but got Tensor[Bool].

6.Related log / screenshot / 日志 / 截图 (Mandatory / 必填)

报错关键日志截图:

 @Level3
    def test_n_rmseloss_input_3x7x2x9_dtype_error_bool():
        logits = Tensor(np.random.randn(3, 7, 2, 9).astype(np.bool_))
        label = Tensor(np.random.randn(3, 7, 2, 9).astype(np.bool_))
        fact = RMSELossMock(inputs=[logits, label])
>       with pytest.raises((RuntimeError, TypeError, ValueError)):
E       Failed: DID NOT RAISE (<class 'RuntimeError'>, <class 'TypeError'>, <class 'ValueError'>)

../test_n_rmseloss.py:195: Failed
=============================== warnings summary ====

完整日志(通过附件上传):

https://testreporter.szv.dragon.tools.huawei.com/TestDataBot/analysis/taskdetailes?productId=mindspore&productLine=2012 Laboratories&taskId=2326593508668866711&tmssPath=%2F03200tqk2t5d0%2F03o5107oo9agj%2F03mb1082tjvbv%2F&title=CT_mindspore_ascend910a_op_pynative_standalone_full_2025-02-23 05:22:20&isMergedTask=false&nodeDate=2025-02-23&year=2024-2025&TestNow=true&testcaseid=67bb21c384dee72f16dfcfaf&workspaceId=67bb21bf68393c7aa584f463&sub=tab1

7.Special notes for this issue/备注 (Optional / 选填)

【定位人】

【根因分析模板】
特别说明: 针对master上所有问题需要,走回归前评论里 进行问题引入分析(默认特性在特性分支已经质量OK)

    1. 测试新增测试场景/测试漏测/用例未适配
      测试原因:xxx ,1. 新增测试场景要讲清楚是什么测试活动 2. 用例未适配要讲清楚未适配原因(是开发未通知测试,还是测试忘记适配)3. ……
      用例如果有新增,则补充 用例新增时间:2025/x/x
      是否偶现:是/否
    1. 环境问题
      具体环境问题描述:要讲清楚具体是什么问题,如 OS 不兼容/机器内存不足/数据集不全/……,不允许因为换一台机器不复现就走单,要有明确环境原因
      是否偶现:是/否
    1. CANN 升级
      CANN 包引入,具体 CANN 哪个组件,是否偶现:是/否

问题单回归原则:问题引入原因没描述清楚,测试人员直接将问题单打回,让开发人员补充说明后再回归

likedislike
Ttanxinglian
2025年2月25日 创建了Bug-Report
此处折叠了12条事件消息 查看更多
司小南(机器人)司小南(机器人)成员
2025年3月6日 将负责人从 tanxinglian 修改为cccc1111
司小南(机器人)
司小南(机器人)成员
2025年3月6日 评论:

【问题单处理不规范】:您问题单根因分析不规范,问题单自动打回:

  1. 未对此问题进行问题分析

具体规则请查看: https://e.gitee.com/mind_spore/docs/2489468/file/5767947?sub_id=11382313&scope=undefined
@cc98132123

likedislike
司小南(机器人)
司小南(机器人)成员
2025年3月6日 评论:

请参考以下典型优秀案例进行问题单根因分析,如未按此模板进行根因分析,转回归会被打回,更多问题单规范请参看https://e.gitee.com/mind_spore/docs/2489468/file/5767947?sub_id=11382313&scope=undefined

Appearance & Root Cause
问题:pangu_sigma2.3编译耗时优化未达预期
根因:
1、 2.3上某些pass相比于2.2版本的实现,存在性能劣化
2、 2.3版本把trace功能下掉了,导致前端编译劣化

Fix Solution
1、修复性能劣化的前端图优化pass
2、通过支持boost infer功能把trace功能下掉导致的性能劣化拿回来

Fix Description & Test Suggestion
https://gitee.com/mindspore/mindspore/pulls/70920 PR合入后daily包回归
测试建议:该问题可以通过特性用例防护,增加****场景。

Self-test Report & DT Review
目前前后端耗时在12分钟以内。
是否需要补充 ST/UT:否 如果选择否,请补充理由
原因:非基本功能问题

Introduction Analysis
引入类型:特性合入引入
引入PR:https://e.gitee.com/mind_spore/repos/mindspore/mindspore/pulls/xxx
PR合入时间:年/月/日
问题是否偶现:是/否

likedislike
AAtomGit-Bot
2025年3月10日 将里程碑从 B-SIG-Parallel 修改为B-ComponentTest
AAtomGit-Bot
2025年3月10日 将负责人从 cccc1111 修改为tanxinglian
AAtomGit-Bot
2025年3月10日 将里程碑从 B-ComponentTest 修改为B-SIG-OPS
AAtomGit-Bot
2025年3月10日 将里程碑从 B-SIG-OPS 修改为B-ComponentTest
tanxinglian
2025年3月19日 评论:

适配用例 ascend pynative模式bool类型已支持

likedislike
Ttanxinglian
2025年3月19日 将任务状态从 TODO 修改为DONE
Iivss成员
2025年9月11日 移除了gitee(已删除)标签
AtomGit小助手AtomGit小助手成员
2025年12月13日 关联了看板:MindSpore Bug Tracking System