Skip to content

[NPU] 新增 FLAGS_npu_skip_float_status,支持缺少 float status 算子的设备(如昇腾 910C)#2559

Open
youzi618 wants to merge 1 commit into
PaddlePaddle:developfrom
youzi618:patch-1
Open

[NPU] 新增 FLAGS_npu_skip_float_status,支持缺少 float status 算子的设备(如昇腾 910C)#2559
youzi618 wants to merge 1 commit into
PaddlePaddle:developfrom
youzi618:patch-1

Conversation

@youzi618
Copy link
Copy Markdown

Motivation

昇腾 910C 不支持 NPUAllocFloatStatus / NPUClearFloatStatus / NPUGetFloatStatus
这组 ACL 算子,而 PaddleCustomDevice 默认在每个 kernel 执行前都会调用它们做 nan/inf
检测,导致 paddle / PaddleOCR 在 910C 上无法运行。

Change

新增开关 FLAGS_npu_skip_float_status(默认 false,不影响存量 910B 设备)。
开启后跳过 InitFloatStatus / GetFloatStatus 以及 NpuOpRunner::Run 中的
float status 调用,使 910C 可正常运行。

Related

在昇腾 910C 上自行适配 PaddleOCR PPStructureV3 时发现:
PaddlePaddle/PaddleOCR#18065

…s ACL ops

Ascend 910C does not support NPUAllocFloatStatus/NPUClearFloatStatus/NPUGetFloatStatus ACL ops, which PaddleCustomDevice calls before every kernel for nan/inf checking. Add FLAGS_npu_skip_float_status (default false, no impact on existing 910B) to skip them so 910C can run.

Related: PaddlePaddle/PaddleOCR#18065
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented May 27, 2026

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants