Merged
PCIe through需求代码实现 #742
ren-botaoAdd on Aug 15
PCIe through需求代码实现 #742
Merged
ren-botaoAdd on Aug 15
ren-botao
ren-botaoCollaborators
Aug 15

描述

本 PR 主要实现 PCIe through 需求相关代码:完善 PCIe through 的初始化与地址段获取逻辑,将 PCIe through 标志作为新的 tiling 输入项传递给算子,并在张量缓存逻辑中避免重复判定 PCIe 地址。改动集中在 op_feature.cpp、op_cache.cpp 以及 tilingctx_builder.cpp/h。

关联的Issue

#312 nnopbase支持PCIe through

测试

冒烟看护

文档更新

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for ren-botao's contribution.)
ren-botaoren-botaoCollaborators
Aug 15 Created pull request, commit 7c8fd972
atomgit-bot
atomgit-bot
Aug 15 Comments:

变更摘要

本 PR 主要实现 PCIe through 需求相关代码:完善 PCIe through 的初始化与地址段获取逻辑,将 PCIe through 标志作为新的 tiling 输入项传递给算子,并在张量缓存逻辑中避免重复判定 PCIe 地址。改动集中在 op_feature.cpp、op_cache.cpp 以及 tilingctx_builder.cpp/h。

主要改动

  • PCIe through 初始化逻辑完善:在 op_feature.cpp 中新增弱符号声明 aclrtHostGetDevicePointerAddrRange、IsHostDeviceConnectWithPcie 与 GetPcieAddrRange,并在 InitPcieThroughInfo 中通过架构判断(DAV_3510/DAV_9201/DAV_9202)、主机设备 PCIe 连接判断及真实地址段查询来启用特性,替换了原先的临时假地址段。
  • 新增 PCIe through tiling 输入项:在 tilingctx_builder.cpp 中引入 TilingOtherInputIdx 枚举及 SetTilingOtherInput/GetTilingOtherInputValue 辅助函数,新增 PCIE_THROUGH_FLAG 输入项,将 usePcieAddr 通过 pcieThroughFlagValue_ 传入 tiling 上下文。
  • ResetTilingCtx 返回类型调整:将 TilingCtxHolder::ResetTilingCtx 的返回值从 size_t 改为 aclnnStatus,并将容量检查改用 CHECK_COND,调用处相应处理错误返回。
  • 张量缓存判定优化:在 op_cache.cpp 的 AddTensorAddrToCachedList 和 AddAclTensorToCachedList 中增加 !usePcieAddr 前置条件,仅在尚未命中 PCIe 地址时才执行 IsTensorAddrInPcieRange 判断,避免重复设置。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
Aug 15 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Aug 15 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Aug 15 Comments:

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robotCollaborators
Aug 15 Comments:

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
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-robotCANN-robotCollaborators
Aug 15 Set pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,jia0liang,zl_hw,songkai111,pingchuantang,llimwang,gubaocheng as approver
CANN-robotCANN-robotCollaborators
Aug 15 Set pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,jia0liang,zl_hw,songkai111,pingchuantang,llimwang,gubaocheng as approver
ren-botaoren-botaoCollaborators
Aug 26 Modify description of pull request
ren-botao
ren-botaoCollaborators
Aug 26 Comments:

compile

likedislike
ren-botaoren-botaoCollaborators
Aug 26 Pre merge succeeded (commit_id: baedca80741f67421650392a010226424df32139)
CANN-robotCANN-robotCollaborators
Aug 26 Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Aug 26 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Aug 26 Added label: ci-pipeline-passed
songkai111
songkai111Collaborators
Aug 27 Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
Aug 27 Added label: approved
TangPC
TangPCCollaborators
Aug 27 Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
Aug 27 Added label: lgtm
CANN-robotCANN-robotCollaborators
Aug 27 Merged pull request