已合并
优化host侧宏 #5321
JC1126创建于 9 天前
优化host侧宏 #5321
已合并
JC1126创建于 9 天前
JC1126成员
9 天前

描述

关联的Issue

测试

文档更新

类型标签

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

变更摘要

本 PR 主要优化 host 侧宏判断逻辑:将 include/c_api/asc_reg_vector.hinclude/c_api/asc_simd.h 中的条件编译条件由 (defined(__NPU_ARCH__) && (__NPU_ARCH__ == 3510)) 扩展为 !defined(__NPU_ARCH__) || (defined(__NPU_ARCH__) && (__NPU_ARCH__ == 3510)),使相关头文件在未定义 __NPU_ARCH__ 的 host 侧编译场景下同样生效,同时保留 NPU 架构 3510 下的原有包含行为。

主要改动

  • 扩展 asc_reg_vector.h 的包含条件: 将工具头文件包含块(utils/base/helpers.hutils/debug/asc_assert.hutils/debug/asc_dump.h)的编译条件由仅限 __NPU_ARCH__ == 3510 扩展为「未定义 __NPU_ARCH__(host 侧)或 __NPU_ARCH__ == 3510」,使 host 侧也能引入这些依赖。
  • 扩展 asc_simd.h 的包含条件: 将 #include "c_api/asc_reg_vector.h" 的引入条件同步扩展为「未定义 __NPU_ARCH__(host 侧)或 __NPU_ARCH__ == 3510」,保证 host 侧编译时 asc_simd.h 同样能依赖 asc_reg_vector.h
likedislike
atomgit-bot
atomgit-bot
9 天前 评论:

代码审查

✅ 未发现问题

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

CLA Signature Pass

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

likedislike
此处折叠了41条消息 查看更多
Lycheeeee成员
9 天前 评论:

/lgtm

likedislike
wuzhaolin成员
9 天前 评论:

/approve

likedislike
吴洋成员
9 天前 评论:

/lgtm
/approve

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