已合并
修复Yolo算子原型宏隔离 #1251
修复Yolo算子原型宏隔离 #1251
已合并
wkkk0528创建于 16 天前
wkkk0528
16 天前

描述

修复Yolo算子原型宏隔离,支持630之后开源子仓和canndev交叉独立升级

背景

开源仓9.1.0中没有Yolo对应原型,canndev master和9.1.0的原型不能删除。交叉独立升级时会产生重定义编译错误,需要通过宏隔离解决。

修改内容

  • objdetect/yolo/op_graph/yolo_proto.h: REG_OP(Yolo)添加 OPS_PROTO_DEF_YOLO 宏隔离

关联的issue

https://gitcode.com/cann/ops-cv/issues/716

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 wkkk0528 的贡献)
Wwkkk0528
16 天前 创建了 pull request,commit d6baf84d
atomgit-bot
atomgit-bot
16 天前 评论:

变更摘要

此 PR 在 objdetect/yolo/op_graph/yolo_proto.h 中为 Yolo 算子原型注册 REG_OP(Yolo) 添加了 OPS_PROTO_DEF_YOLO 宏隔离,通过 #ifndef / #define / #endif 条件编译守卫防止在开源子仓与 canndev 交叉独立升级时因重复定义而产生编译错误。

主要改动

  • 添加 #ifndef OPS_PROTO_DEF_YOLO 条件编译守卫:在 REG_OP(Yolo) 之前插入 #ifndef OPS_PROTO_DEF_YOLO,使得当该宏已被定义时跳过整个 Yolo 算子原型注册块。
  • 添加 #define OPS_PROTO_DEF_YOLO 宏定义:在条件分支内部紧随 #ifndef 之后定义 OPS_PROTO_DEF_YOLO 宏,确保 Yolo 原型仅被注册一次。
  • 添加 #endif 闭合条件编译块:在 OP_END_FACTORY_REG(Yolo) 之后插入 #endif,完整闭合宏隔离作用域。
likedislike
atomgit-bot
atomgit-bot
16 天前 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
16 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
16 天前 评论:

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
*/*/op_graph/*_proto.h 王永光, 张磊, 周奇龙 (3/2) 王永光 (1/1)
repo-cann/ops-cv 张磊, 周奇龙 (2/2) 张磊, 周奇龙 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
此处折叠了119条消息 查看更多
CANN-robotCANN-robot成员
12 天前 添加了label:approved
sunday成员
11 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
11 天前 添加了label:lgtm
CANN-robotCANN-robot成员
11 天前 关闭了关联的issue
CANN-robotCANN-robot成员
11 天前 合入了pull request