已合并
修复gcc15编译UT问题:补齐cstdint头文件并将indv_executor_ext.cpp编入测试TU #791
songkai111创建于 11 天前
修复gcc15编译UT问题:补齐cstdint头文件并将indv_executor_ext.cpp编入测试TU #791
已合并
songkai111创建于 11 天前
songkai111成员
11 天前

描述

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 songkai111 的贡献)
Ssongkai111成员
11 天前 创建了 pull request,commit b848606c
atomgit-bot
atomgit-bot
11 天前 评论:

变更摘要

本 PR 旨在修复 GCC 15 下编译单元测试(UT)失败的问题。GCC 15 不再为匿名命名空间(anonymous namespace)中的符号提供全局链接,导致测试无法再通过 extern 声明访问 executor_utest.cpp 中使用的内部状态(如 g_nnopbaseStreamMap)。为此,改动将 indv_executor_ext.cpp 直接 #include 进测试编译单元(该文件已从 tests/nnopbase/ut/CMakeLists.txtNNOPBASE_SRC_FILES 中排除),使内部符号在测试文件中可见;同时为 small_vector.h 补齐 cstdint 头文件以适配 GCC 15 的编译要求。

主要改动

  • 补齐 cstdint 头文件:在 include/nnopbase/opdev/small_vector.h 中新增 #include <cstdint>,解决 GCC 15 编译时头文件缺失的问题。
  • indv_executor_ext.cpp 编入测试 TU:在 tests/nnopbase/ut/individual_op/executor_utest.cpp 中通过 #include "executor/indv_executor_ext.cpp" 将其包含进测试编译单元,使测试可以直接访问其匿名命名空间中的内部状态(如 g_nnopbaseStreamMap),替代 GCC 15 下已失效的 extern 引用方式。
  • 移除失效的 extern 声明:删除 NnopbaseStreamCallbackFuncForStreamNnopbaseStreamCallbackFuncForContextWithDefaultStream 两个测试中针对 g_nnopbaseStreamMapextern std::unordered_map<void*, NnopbaseStreamForCombineExecution> 声明,改为依赖上述 #include 引入的可见符号,并补充了相应的注释说明。
likedislike
不准确?
atomgit-bot
atomgit-bot
11 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
11 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
11 天前 评论:

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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
include 汤磊, 汤平川, 张磊 (3/2) 汤磊 (1/1)
repo-cann/opbase 张磊, 汤平川 (2/2) 张磊, 汤平川 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
CANN-robot
CANN-robot成员
11 天前 评论:

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
11 天前 将pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,tang-lei01,jia0liang,zl_hw,pingchuantang,llimwang,gubaocheng,wangyongguang设为评审人
此处折叠了5条事件消息 查看更多
CANN-robotCANN-robot成员
11 天前 添加了label:cann-cla/yes
songkai111成员
11 天前 评论:

compile

likedislike
Ssongkai111成员
11 天前 update merge request[project id: 7649482, iid: 791, commit_id: 85e5440eb542a633d21d47b9b95f595ee16ceb18] virtual merging success
CANN-robotCANN-robot成员
11 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
11 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
11 天前 添加了label:ci-pipeline-passed
TangPC
TangPC成员
11 天前 评论:

/lgtm
/approve

likedislike
zl_hw成员
11 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
11 天前 添加了label:lgtm
tang-lei01成员
11 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
11 天前 添加了label:approved
CANN-robotCANN-robot成员
11 天前 合入了pull request