已合并
优化host侧宏 #5321
JC1126创建于 9 天前
优化host侧宏 #5321
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 JC1126 的贡献)atomgit-bot
9 天前 评论:
9 天前 评论:
变更摘要
本 PR 主要优化 host 侧宏判断逻辑:将 include/c_api/asc_reg_vector.h 与 include/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.h、utils/debug/asc_assert.h、utils/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。


atomgit-bot
9 天前 评论:
9 天前 评论:
9 天前 添加了label:cann-cla/yes
CANN-robot
9 天前 评论:
9 天前 评论:
此处折叠了41条消息 查看更多
9 天前 添加了label:lgtmapproved
9 天前 合入了pull request
描述
关联的Issue
测试
文档更新
类型标签