已合并
add test case for event elapsed_time #26734
kuhn7创建于 2025年11月19日
add test case for event elapsed_time #26734
已合并
kuhn7创建于 2025年11月19日
kuhn7成员
2025年11月19日

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind bug
/kind task
/kind feature

What does this PR do / why do we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewers:

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 kuhn7 的贡献)
Kkuhn7成员
2025年11月19日 创建了 pull request,commit bbba3678
ascend-robot
ascend-robot成员
2025年11月19日 评论:

Thank your for your pull-request.

The full list of commands accepted by me can be found at here.

You can get sig-info at here

likedislike
AtlasAccount
AtlasAccount成员
2025年11月19日 评论:
ascend-robot
ascend-robot成员
2025年11月19日 评论:

以下是根据您提交的修改文件推荐的Reviewer和Committer序列,需各模块评审通过后方可合入

Module List Reviewers Committers
repo-Ascend/pytorch yanpengquan, dilililiwhy, yangkaixin, li_jing_hw, ShaoFeifan liwei386, shaoyf, wangchao285, zqwenn, chenhao_1209
likedislike
ascend-robotascend-robot成员
2025年11月19日 添加了label:ascend-cla/yes
kuhn7成员
2025年11月19日 评论:

compile

likedislike
ascend-robot
ascend-robot成员
2025年11月19日 评论:

CLA Signature Pass

@kuhn7, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
openLiBingCI成员
2025年11月19日 评论:

问题/功能描述

新增NPU设备上的事件耗时测量功能测试用例,验证torch.Event在NPU设备上的elapsed_time方法能够正确测量矩阵乘法操作的执行时间,确保NPU设备的事件计时功能正常工作。

修改方案描述

在TestAccelerator测试类中添加test_event_elapsed_time方法,通过创建启用计时的事件对象,在NPU设备上执行矩阵乘法运算,使用start_event和end_event记录操作时间点,调用elapsed_time方法计算耗时并验证结果大于0,确保事件计时功能的准确性和可用性。

likedislike
AtlasAccount
AtlasAccount成员
2025年11月19日 评论:

流水线任务触发成功,正在执行,请稍候。 任务链接[5d633b51275242018fd592ee25d96323]

likedislike
AtlasAccountAtlasAccount成员
2025年11月19日 添加了label:ci-pipeline-running
AtlasAccount
AtlasAccount成员
2025年11月19日 评论:

get-log

likedislike
AtlasAccountAtlasAccount成员
2025年11月19日 删除了label:ci-pipeline-running
AtlasAccountAtlasAccount成员
2025年11月19日 添加了label:ci-pipeline-running
AtlasAccountAtlasAccount成员
2025年11月19日 删除了label:ci-pipeline-running
AtlasAccountAtlasAccount成员
2025年11月19日 添加了label:ci-pipeline-passed
AtlasAccount
AtlasAccount成员
2025年11月19日 评论:
检查项 状态 日志 产物
code_check >>> N/A
sca >>> N/A
check_error >>> N/A
anti poison >>> N/A
Build_ARM_USE_CXX_ABI >>> >>>
Build_LibTorch_USE_CXX_ABI >>> >>>
Build_X86_USE_CXX_ABI >>> >>>
UT_X86_Part_01 >>> N/A
UT_X86_Part_02 >>> N/A
UT_ARM_A2_Part_01 >>> N/A
UT_ARM_A2_Part_02 >>> N/A
openlibing链接 点此跳转
likedislike
AtlasAccountAtlasAccount成员
2025年11月19日 删除了label:ci-pipeline-passed
AtlasAccountAtlasAccount成员
2025年11月19日 添加了label:ci-pipeline-passed
yanpengquan成员
2025年11月19日 评论:

/approve

likedislike
ascend-robotascend-robot成员
2025年11月19日 添加了label:lgtm
王超成员
2025年11月20日 评论:

/approve

likedislike
ascend-robotascend-robot成员
2025年11月20日 添加了label:approved
ascend-robot
ascend-robot成员
2025年11月20日 评论:

Review Guide

This Pull-Request Passes Review.
Committers who writed a comment of /approve are: wangchao430, yanpengquan.
Reviewers who writed a comment of /lgtm are: yanpengquan, wangchao430.

likedislike
ascend-robotascend-robot成员
2025年11月20日 合入了pull request