已合并
修复gcc15编译UT问题:补齐cstdint头文件并将indv_executor_ext.cpp编入测试TU #791
songkai111创建于 11 天前
修复gcc15编译UT问题:补齐cstdint头文件并将indv_executor_ext.cpp编入测试TU #791
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 songkai111 的贡献)11 天前 创建了 pull request,commit b848606c
atomgit-bot
11 天前 评论:
11 天前 评论:
变更摘要
本 PR 旨在修复 GCC 15 下编译单元测试(UT)失败的问题。GCC 15 不再为匿名命名空间(anonymous namespace)中的符号提供全局链接,导致测试无法再通过 extern 声明访问 executor_utest.cpp 中使用的内部状态(如 g_nnopbaseStreamMap)。为此,改动将 indv_executor_ext.cpp 直接 #include 进测试编译单元(该文件已从 tests/nnopbase/ut/CMakeLists.txt 的 NNOPBASE_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声明:删除NnopbaseStreamCallbackFuncForStream与NnopbaseStreamCallbackFuncForContextWithDefaultStream两个测试中针对g_nnopbaseStreamMap的extern std::unordered_map<void*, NnopbaseStreamForCombineExecution>声明,改为依赖上述#include引入的可见符号,并补充了相应的注释说明。


不准确?
atomgit-bot
11 天前 评论:
11 天前 评论:
11 天前 添加了label:cann-cla/yes
CANN-robot
11 天前 评论:
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
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


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


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


11 天前 添加了label:lgtm
tang-lei01
11 天前 评论:
11 天前 评论:
/approve


11 天前 添加了label:approved
11 天前 合入了pull request
描述
关联的Issue
测试
文档更新
类型标签