Merged
PCIe through需求代码实现 #742
ren-botaoAdd on Aug 15
PCIe through需求代码实现 #742
Merged
Merged fromren-botao/opbasepcie_through_2intocann/opbasemaster
Pull Request has been successfully merged by CANN-robot.
(Thank you for ren-botao's contribution.)atomgit-bot
Aug 15 Comments:
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判断,避免重复设置。


Incorrect?
atomgit-bot
Aug 15 Comments:
Aug 15 Comments:
Aug 15 Added label: cann-cla/yes
CANN-robot
Aug 15 Comments:
Aug 15 Comments:
CANN-robot
Aug 15 Comments:
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
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


Aug 15 Set pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,jia0liang,zl_hw,songkai111,pingchuantang,llimwang,gubaocheng as approver
Aug 15 Set pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,jia0liang,zl_hw,songkai111,pingchuantang,llimwang,gubaocheng as approver
Aug 15 Set pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,jia0liang,zl_hw,songkai111,pingchuantang,llimwang,gubaocheng as approver
Aug 15 Set pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,jia0liang,zl_hw,songkai111,pingchuantang,llimwang,gubaocheng as approver
Aug 26 Modify description of pull request
ren-botao
Aug 26 Comments:
Aug 26 Comments:
compile


Aug 26 Pre merge succeeded (commit_id: baedca80741f67421650392a010226424df32139)
Aug 26 Added label: ci-pipeline-running
Aug 26 Removed label: ci-pipeline-running
Aug 26 Added label: ci-pipeline-passed
songkai111
Aug 27 Comments:
Aug 27 Comments:
/approve


Aug 27 Added label: approved
TangPC
Aug 27 Comments:
Aug 27 Comments:
/lgtm
/approve


Aug 27 Added label: lgtm
Aug 27 Merged pull request
描述
本 PR 主要实现 PCIe through 需求相关代码:完善 PCIe through 的初始化与地址段获取逻辑,将 PCIe through 标志作为新的 tiling 输入项传递给算子,并在张量缓存逻辑中避免重复判定 PCIe 地址。改动集中在 op_feature.cpp、op_cache.cpp 以及 tilingctx_builder.cpp/h。
关联的Issue
#312 nnopbase支持PCIe through
测试
冒烟看护
文档更新
类型标签