Merged
【feat】: Support PCIe Through #430
kantao1Add on Aug 14
【feat】: Support PCIe Through #430
Merged
kantao1Add on Aug 14
kantao1
kantao1Collaborators
Aug 14

Pull Request

接口评审时间:2026/08/06(周四)

描述

  1. 新增SetSupportPcieThrough,支持在IMPL_OP时声明算子支持 PCIe Through
  2. TilingContext 中新增 GetPcieThroughFlag,可以返回当前算子是否走 PCIe Through标识

变更类型

请选择本次引入的变更类型:

关联的Issue

如何测试

描述测试此变更的步骤和前提条件:

  1. 通过DT验证即可

核对清单

其他信息

在此添加任何其他关于本次 PR 的说明。

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for kantao1's contribution.)
kantao1kantao1Collaborators
Aug 14 Added label: enhancement
kantao1kantao1Collaborators
Aug 14 Created pull request, commit 03b375cc
atomgit-bot
atomgit-bot
Aug 14 Comments:

变更摘要

本 PR 主要为算子实现注册与 Tiling 上下文新增 PCIe Through 能力:在 OpImplRegisterV2 中新增 SetSupportPcieThrough(),使算子在 IMPL_OP 阶段即可声明支持 PCIe Through;在 TilingContext 中新增 GetPcieThroughFlag(),用于查询当前算子是否走 PCIe Through。相关标记通过 OpImplKernelRegistry 中的 reserved_ 数组位 kPcieThroughFlagIdx 进行存储与读取。

主要改动

  • 新增 OpImplRegisterV2::SetSupportPcieThrough() 接口: 在 inc/external/register/op_impl_registry.h 中声明并在 base/registry/op_impl_registry.cc 中实现,允许算子注册时设置 PCIe Through 支持标记。
  • 新增 OpImplKernelRegistry 的 PCIe Through 标志位管理: 引入 constexpr size_t kPcieThroughFlagIdx = 0U,并新增 IsSupportPcieThrough() 与 SetSupportPcieThrough(),通过 reserved_[kPcieThroughFlagIdx] 存储和判断该标记。
  • 注册流程支持 PCIe Through 标记: 在 RegisterOpImplToRegistry 中增加对 IsSupportPcieThrough() 的判断,若为真则调用 funcs.SetSupportPcieThrough() 并输出 [SetSupportPcieThrough] 日志。
  • 新增 TilingContext::GetPcieThroughFlag() 查询接口: 在 inc/external/exe_graph/runtime/tiling_context.h 中实现,通过 GetComputeNodeInfo() 计算输入输出之外的索引读取 av->GetValue<bool>(),当任一输入为 PCIe 地址时返回 true。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
Aug 14 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Aug 14 Added label: cann-cla/yes
90 messages are collapsed here。 See more
王涛
王涛Collaborators
Aug 31 Comments:

/lgtm

likedislike
王涛
王涛Collaborators
Aug 31 Comments:

/approve

likedislike
CANN-robot
CANN-robotCollaborators
Aug 31 Comments:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
hugo111

likedislike
CANN-robotCANN-robotCollaborators
Aug 31 Added label: approved
CANN-robotCANN-robotCollaborators
Aug 31 Merged pull request