[NPU] 新增 FLAGS_npu_skip_float_status,支持缺少 float status 算子的设备(如昇腾 910C)#2559
Open
youzi618 wants to merge 1 commit into
Open
[NPU] 新增 FLAGS_npu_skip_float_status,支持缺少 float status 算子的设备(如昇腾 910C)#2559youzi618 wants to merge 1 commit into
youzi618 wants to merge 1 commit into
Conversation
…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
|
|
|
Thanks for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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