Pull Request has been successfully merged by CANN-robot.
(Thank you for pengjiahao96's contribution.)变更摘要
本 PR 主要让 aclnn 自动框架支持 pcie_through 算子:在算子输入输出接入阶段检测 tensor 地址是否位于 PCIe 范围,将 isEnablePcie 标记写入 executor,并据此跳过参数缓存、向 tiling context 传递 kInputsEnablePcieThrough;同时把静态 kernel 的 key 生成与查找逻辑重构到 nnopbase::StaticKernelHelper,在 key 中新增 PCIe 分片,并按「PCIe+stride → 无 PCIe+stride → 无 stride」的顺序回退匹配,以兼容未区分 PCIe 的存量静态 kernel。
主要改动
-
PCIe 地址检测与标记:新增
NnopbaseUpdatePcieThroughFlag重载,在NnopbaseAddInput、NnopbaseAddOutput、NnopbaseAddDynamicInput、NnopbaseAddDynamicOutput等接口中调用op::internal::IsPcieThroughEnabled和IsTensorAddrInPcieRange检测地址,并设置NnopbaseExecutor::isEnablePcie;NnopbaseInit中新增InitPcieThroughInfo()初始化。 -
PCIe 场景下跳过参数缓存:
NnopbaseMatchArgs与NnopbaseExecutorMatchCache在isEnablePcie为真时将ownArgs.enableCache置为false,并调用NnopbaseAddIoTensors补齐 IO;NnopbaseAddIoTensors新增completeIoByPcie保护,避免重复配置 IO。 -
静态 kernel 查找逻辑重构:新增
static_kernel_helper.h/.cpp中的nnopbase::StaticKernelHelper,提供FindPath与FindStaticBinInfo,按head、pcie、tensors(stride/no-stride)、attrs分片生成 key,并实现FindByCompatibilityProfiles回退查找;删除原NnopbaseCollectorGenStaticKey、NnopbaseCollectorGetStaticKernelBin、NnopbaseExecutorGenStaticKey等旧实现。 -
数据结构与序列化扩展:
NnopbaseStaticRuntimeInfo与aclnnOpInfoRecord::OpCompilerOption新增enablePcie字段;op_info_serialize.cpp将platform_info.pcie_through写入 JSON dump。 -
tiling context 传递 PCIe 信息:
InputsAppend枚举新增kInputsEnablePcieThrough,NnopbaseTilingContextBuild将executor->isEnablePcie写入 tiling context 的输入值,使 tiling 阶段可感知 PCIe 开关。


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)
CLA Signature Pass
pengjiahao96, thanks for your pull request. All authors of the commits have signed the CLA. 👍


/approve


/lgtm
/approve


描述
aclnn自动框架支持PCIe算子
关联的Issue
#312 nnopbase支持PCIe through
测试
文档更新
类型标签