已合并
fix(build): 修复依赖缺失 #84
LiuZonggu创建于 8月19日
fix(build): 修复依赖缺失 #84
已合并
LiuZonggu创建于 8月19日
从已删除 :fix/ci-source-build-deps合入到cann/ops-rasmaster
LiuZonggu成员
8月19日

描述

修复提交 3d01c9dda789a61544ef9ea115a2b559c9690997 精简依赖和本地 OpAPI stub 后引入的源码模式 CI 编译问题。

具体调整:

  • 删除 RAS_NEEDS_AICPU、RAS_NEEDS_PROTOBUF、RAS_NEEDS_EIGEN、RAS_NEEDS_TILING_API 及仅用于这些门控的源码扫描。
  • 无条件初始化 AICPU、Tiling API、Protobuf 和 Eigen 依赖,并统一在 ENABLE_TEST 下初始化 tikicpulib。
  • 保留仅在确有 Graph 源码并请求 Graph UT 时加载 mmpa 的门控。
  • 恢复 ${OPS_RAS_DIR}/common/stub/op_api include 头文件,以及仍被产品 OpAPI 和 UT 直接使用的 cast.h、contiguous.h、op_error_check.h。

关联的Issue

#19

测试

  • ut 通过。
  • 安装卸载无问题

文档更新

无。

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 LiuZonggu 的贡献)
LLiuZonggu成员
8月19日 创建了 pull request,commit e6b79d67
atomgit-bot
atomgit-bot
8月19日 评论:

变更摘要

本 PR 为构建修复:解决提交 3d01c9dda789a61544ef9ea115a2b559c9690997 精简依赖与本地 OpAPI stub 后引入的源码模式 CI 编译问题。核心思路是将此前按开关条件加载的 AICPU、Tiling API 等依赖改为无条件初始化,统一 tikicpulib 的初始化条件,保留仅针对 Graph 源码 + Graph UT 场景的 mmpa 门控,并恢复 ${OPS_RAS_DIR}/common/stub/op_api 的 include 路径及仍被产品 OpAPI 和 UT 直接使用的 cast.h、contiguous.h、op_error_check.h 头文件。

主要改动

  • 依赖查找去门控化(cmake/dependencies.cmake):删除 RAS_NEEDS_AICPU、RAS_NEEDS_TILING_API 等条件分支,将 find_package(runtime)、find_package(nnopbase)、find_package(tilingapi)、find_package(aicpu) 改为无条件 REQUIRED,并将 tikicpulib 的查找统一放到 ENABLE_TEST 条件下执行。
  • 保留 Graph UT 专属门控(cmake/dependencies.cmake):find_package(mmpa) 仅在 (OP_GRAPH_UT OR UT_TEST_ALL) AND RAS_HAS_GRAPH_SOURCE 时加载,避免无条件引入该依赖。
  • 恢复 stub 头文件搜索路径(cmake/variables.cmake):在 OPAPI_INCLUDE 中新增 ${OPS_RAS_DIR}/common/stub/op_api,使源码模式编译可找到本地 stub 头文件。
  • 补回被直接使用的 OpAPI stub 头文件:新增 common/stub/op_api/aclnn_kernels/cast.h(声明 l0op::Cast、l0op::CastOnlyForConvBackward)、contiguous.h(定义 ContiguousParam 结构及 Contiguous、ViewCopy、PickViewAsContiguous、ReViewToOut、CanOptimizeContiguous 等接口)以及 common/op_error_check.h(提供 IsNullptr、CheckDims、CheckReduceOutShape、CheckNCDimValid 等校验函数与 OP_CHECK_* 系列宏)。
likedislike
不准确?
atomgit-bot
atomgit-bot
8月19日 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
8月19日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
8月19日 评论:

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.
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
repo-cann/ops-ras ✅ yue-ma, chenxingyu18 (2/2) ✅ yue-ma (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
此处折叠了59条消息 查看更多
CANN-robotCANN-robot成员
8月19日 添加了label:approved
chenxingyu18成员
8月19日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
8月19日 添加了label:lgtm
CANN-robotCANN-robot成员
8月19日 关闭了关联的issue
CANN-robotCANN-robot成员
8月19日 合入了pull request