已合并
feat: Ascend950比较类算子device校验及平台隔离 #5286
feat: Ascend950比较类算子device校验及平台隔离 #5286
已合并
wangqi_ai创建于 6月27日
wangqi_ai
6月27日

【合入来源】

关联 Issue:https://gitcode.com/Ascend/op-plugin/issues/198

【修改方案】

  1. 为比较类算子(equal、greater、greater_equal、less、less_equal、not_equal、maximum、minimum)在 Ascend950 平台上补充 device 校验逻辑,确保算子在 950 硬件上正确执行
  2. 新增平台隔离判断,在 op_api_common.h 中添加 950 平台的设备类型检查工具函数
  3. 各算子 op_api 层引入 950 分支的 device 校验路径,对不支持的数据类型和平台组合进行拦截

涉及文件:

  • op_plugin/utils/op_api_common.h:新增 950 平台 device 校验公共函数
  • op_plugin/ops/opapi/EqKernelNpuOpApi.cpp:equal 算子 950 device 校验
  • op_plugin/ops/opapi/GeKernelNpuOpApi.cpp:greater_equal 算子 950 device 校验
  • op_plugin/ops/opapi/GtKernelNpuOpApi.cpp:greater 算子 950 device 校验
  • op_plugin/ops/opapi/LeKernelNpuOpApi.cpp:less_equal 算子 950 device 校验
  • op_plugin/ops/opapi/LtKernelNpuOpApi.cpp:less 算子 950 device 校验
  • op_plugin/ops/opapi/NeKernelNpuOpApi.cpp:not_equal 算子 950 device 校验
  • op_plugin/ops/opapi/MaxKernelNpuOpApi.cpp:maximum 算子 950 device 校验
  • op_plugin/ops/opapi/MinKernelNpuOpApi.cpp:minimum 算子 950 device 校验

【资料变更】

不涉及

【接口变更】

不涉及

【功能验证】

  • 比较类算子在 Ascend950 平台上的 device 校验路径覆盖
  • 不支持的 dtype/platform 组合被正确拦截

【CheckList】

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 wangqi_ai 的贡献)
Wwangqi_ai
6月27日 创建了 pull request,commit 9f06c16b
ascend-robotascend-robot成员
6月27日 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
6月27日 评论:

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/op-plugin htchu, songkai111, wanglijun55 (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

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

likedislike
ascend-robotascend-robot成员
6月27日 添加了label:needs-issue
此处折叠了48条消息 查看更多
ascend-robotascend-robot成员
6月29日 添加了label:lgtm
htchu成员
6月29日 评论:

/approve

likedislike
ascend-robotascend-robot成员
6月29日 添加了label:approved
ascend-robotascend-robot成员
6月29日 关闭了关联的issue
ascend-robotascend-robot成员
6月29日 合入了pull request