已合并
[sync] PR-35335: [feat]: A5 only supports INF_NAN mode #35528
ascend-robot创建于 5月13日
[sync] PR-35335: [feat]: A5 only supports INF_NAN mode #35528
已合并
ascend-robot创建于 5月13日
ascend-robot
ascend-robot成员
5月13日

1. Origin pull request:

https://gitcode.com/Ascend/pytorch/merge_requests/35335

https://gitcode.com/Ascend/pytorch/issues/1918

Sha Datetime Message
92382e10 2026-05-12 21:49:33 +0800 CST modify ut
1352140c 2026-05-11 20:54:16 +0800 CST fix(npu): Ascend950 only supports INF_NAN mode, bypass env var checks

Ascend950 does not support saturation mode. When users set
INF_NAN_MODE_ENABLE=0 or INF_NAN_MODE_FORCE_DISABLE=1 on Ascend950,
the code incorrectly falls into saturation mode path, causing
RuntimeError: SET StreamOverflowSwitch Failed.

Add early return in IsSupportInfNan() for Ascend950 to always return
true, making both env vars ineffective on this device.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 ascend-robot 的贡献)
ascend-robotascend-robot成员
5月13日 添加了label:stat/needs-squash
ascend-robotascend-robot成员
5月13日 创建了 pull request,commit c54c1407
ascend-robotascend-robot成员
5月13日 添加了label:stat/needs-squash
ascend-robotascend-robot成员
5月13日 关联了issue:[Feature]: A5 only supports INF_NAN mode
ascend-robot
ascend-robot成员
5月13日 评论:

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
repo-Ascend/pytorch htchu, ffmh (2/2) htchu (1/1)
test htchu, probiotics_53, ffmh (3/2) htchu (1/1)

💡 Tip:

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

CLA Signature Pass

ascend-ds-bot, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
ascend-robotascend-robot成员
5月13日 添加了label:ascend-cla/yes
wanglijun55成员
5月13日 评论:

compile

likedislike
ascend-robot
ascend-robot成员
5月13日 评论:
流水线 PR-pipeline_pytorch#21741 运行中
阶段 任务名 状态 详情
编译构建 Build_X86 🕚 >>>
Build_ARM 🕚 >>>
Build_LibTorch_x86 🕚 >>>
Build_LibTorch_ARM 🕚 >>>
Build_X86_torchair 🕚 >>>
Build_ARM_torchair 🕚 >>>
patch_test 🕚 >>>
恶意代码检查 Antipoison 🕚 >>>
编码安全与规范检查 CodeCheck 🕚 >>>
check_error 🕚 >>>
开源片段检查 SCA 🕚 >>>
开发者测试 UT_X86_Part_01 🕚 >>>
UT_X86_Part_02 🕚 >>>
UT_ARM_A3_Part_01 🕚 >>>
UT_ARM_A3_Part_02 🕚 >>>
UT_DIST_X86_Part_01 🕚 >>>
UT_DIST_X86_Part_02 🕚 >>>
UT_DIST_X86_Part_03 🕚 >>>
UT_DIST_X86_Part_04 🕚 >>>
UT_ARM_A2_Part_01 🕚 >>>
UT_ARM_A2_Part_02 🕚 >>>
UT_ARM_A2_Part_03 🕚 >>>
UT_inductor_Part_01_pool 🕚 >>>
UT_inductor_Part_02_pool 🕚 >>>
UT_inductor_Part_03_pool 🕚 >>>
UT_inductor_Part_04_pool 🕚 >>>
UT_DIST_ARM_Part_01 🕚 >>>
UT_DIST_ARM_Part_02 🕚 >>>
UT_DIST_ARM_Part_03 🕚 >>>
UT_DIST_ARM_Part_04 🕚 >>>
流水线 PR-pipeline_pytorch 🕚 >>>
likedislike
ascend-robotascend-robot成员
5月13日 添加了label:ci-pipeline-running
ascend-robotascend-robot成员
5月13日 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
5月13日 添加了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
5月13日 评论:
流水线 PR-pipeline_pytorch#21741 已完成
阶段 任务名 状态 详情
编译构建 Build_X86 >>>
Build_ARM >>>
Build_LibTorch_x86 >>>
Build_LibTorch_ARM >>>
Build_X86_torchair 🛑 >>>
Build_ARM_torchair 🛑 >>>
patch_test 🛑 >>>
恶意代码检查 Antipoison >>>
编码安全与规范检查 CodeCheck >>>
check_error >>>
开源片段检查 SCA >>>
开发者测试 UT_X86_Part_01 🛑 >>>
UT_X86_Part_02 🛑 >>>
UT_ARM_A3_Part_01 🛑 >>>
UT_ARM_A3_Part_02 🛑 >>>
UT_DIST_X86_Part_01 🛑 >>>
UT_DIST_X86_Part_02 🛑 >>>
UT_DIST_X86_Part_03 🛑 >>>
UT_DIST_X86_Part_04 🛑 >>>
UT_ARM_A2_Part_01 >>>
UT_ARM_A2_Part_02 >>>
UT_ARM_A2_Part_03 >>>
UT_inductor_Part_01_pool 🛑 >>>
UT_inductor_Part_02_pool 🛑 >>>
UT_inductor_Part_03_pool 🛑 >>>
UT_inductor_Part_04_pool 🛑 >>>
UT_DIST_ARM_Part_01 🛑 >>>
UT_DIST_ARM_Part_02 🛑 >>>
UT_DIST_ARM_Part_03 🛑 >>>
UT_DIST_ARM_Part_04 🛑 >>>
流水线 PR-pipeline_pytorch >>>
likedislike
ascend-robotascend-robot成员
5月13日 删除了label:ci-pipeline-passed
ascend-robotascend-robot成员
5月13日 添加了label:ci-pipeline-running
ascend-robotascend-robot成员
5月13日 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
5月13日 添加了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
5月13日 评论:
流水线 PR-pipeline_pytorch#21741 已完成
阶段 任务名 状态 详情
编译构建 Build_X86 >>>
Build_ARM >>>
Build_LibTorch_x86 >>>
Build_LibTorch_ARM >>>
Build_X86_torchair 🛑 >>>
Build_ARM_torchair 🛑 >>>
patch_test 🛑 >>>
恶意代码检查 Antipoison >>>
编码安全与规范检查 CodeCheck >>>
check_error >>>
开源片段检查 SCA >>>
开发者测试 UT_X86_Part_01 🛑 >>>
UT_X86_Part_02 🛑 >>>
UT_ARM_A3_Part_01 🛑 >>>
UT_ARM_A3_Part_02 🛑 >>>
UT_DIST_X86_Part_01 🛑 >>>
UT_DIST_X86_Part_02 🛑 >>>
UT_DIST_X86_Part_03 🛑 >>>
UT_DIST_X86_Part_04 🛑 >>>
UT_ARM_A2_Part_01 >>>
UT_ARM_A2_Part_02 >>>
UT_ARM_A2_Part_03 >>>
UT_inductor_Part_01_pool 🛑 >>>
UT_inductor_Part_02_pool 🛑 >>>
UT_inductor_Part_03_pool 🛑 >>>
UT_inductor_Part_04_pool 🛑 >>>
UT_DIST_ARM_Part_01 🛑 >>>
UT_DIST_ARM_Part_02 🛑 >>>
UT_DIST_ARM_Part_03 🛑 >>>
UT_DIST_ARM_Part_04 🛑 >>>
流水线 PR-pipeline_pytorch >>>
likedislike
htchu成员
5月13日 评论:

/approve

likedislike
ascend-robotascend-robot成员
5月13日 添加了label:approved
XianglongZeng成员
5月14日 评论:

/lgtm

likedislike
ffmh
ffmh成员
5月14日 评论:

/lgtm

likedislike
ascend-robotascend-robot成员
5月14日 添加了label:lgtm
ascend-robot
ascend-robot成员
5月14日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: htchu.
Reviewers who wrote a comment of /lgtm are: htchu, probiotics_53, ffmh.

likedislike
ascend-robotascend-robot成员
5月14日 合入了pull request