已合并
feat: broadcast tiling 模板支持 PcieThrough 场景识别与 UB BRC 强制调度 #788
hahaha22创建于 21 天前
feat: broadcast tiling 模板支持 PcieThrough 场景识别与 UB BRC 强制调度 #788
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 hahaha22 的贡献)atomgit-bot
21 天前 评论:
21 天前 评论:
变更摘要
本 PR 为 broadcast 模板 tiling 增加 PcieThrough 场景识别与 UB BRC 强制调度能力。核心改动集中在 pkg_inc/op_common/atvoss/broadcast/broadcast_tiling.h:在 DoTiling 流程中新增 GetPcieThroughInfo 步骤获取 PcieThrough 标志,并新增成员变量 isPcieThrough;PcieThrough 场景下若输入非连续则直接返回失败(不支持非连续输入);在 DoBroadcastOpTiling 中 PcieThrough 时强制走 UB BRC 调度(isUbBroadcast 置为 true),而非按原有 IsUbBroadcast() 逻辑判断;GetPcieThroughInfo 通过 METADEF_VERSION_NUM 宏做版本兼容,高版本(>= 90200000)调用 context_->GetPcieThroughFlag(),低版本兜底为 false,并显式包含 version/metadef_version.h 头文件。
主要改动
- 新增
GetPcieThroughInfo步骤: 在DoTiling中插入该步骤获取 PcieThrough 标志,失败时记录日志并返回GRAPH_FAILED。 - PcieThrough 非连续输入校验:
DoTiling中当isPcieThrough为 true 且inputAllContiguous为 false 时直接返回失败,明确不支持 PcieThrough 场景下的非连续输入。 - 强制 UB BRC 调度:
DoBroadcastOpTiling中isPcieThrough为 true 时强制isUbBroadcast = true,跳过原有IsUbBroadcast()判定。 - 版本兼容实现:
GetPcieThroughInfo使用METADEF_VERSION_NUM >= 90200000条件编译,高版本调用context_->GetPcieThroughFlag(),低版本兜底isPcieThrough = false,并新增version/metadef_version.h头文件包含。 - 新增状态成员变量: 在类私有成员中新增
bool isPcieThrough = false,默认关闭该特性。


不准确?
atomgit-bot
21 天前 评论:
21 天前 评论:
21 天前 添加了label:stat/needs-squash
21 天前 添加了label:cann-cla/yes
此处折叠了70条消息 查看更多
12 天前 添加了label:approved
12 天前 添加了label:lgtm
12 天前 关闭了关联的issue
12 天前 合入了pull request
描述
broadcast 模板 tiling 增加 PcieThrough(PCIe 直通)场景识别,保证该场景下经 broadcast 模板调度的算子行为正确:
DoTiling新增GetPcieThroughInfo步骤:高版本 SDK(METADEF_VERSION_NUM >= 90200000)调用context_->GetPcieThroughFlag()获取标志,低版本走#else兜底isPcieThrough = false,保持存量行为不变GetPcieThroughInfo中对isPcieThrough && !inputAllContiguous直接返回失败并报错DoOneDimOpTilingAdvance/DoOneDimOpTiling快速路径,统一走DoBroadcastOpTilingDoBroadcastOpTiling中 PcieThrough 时置isUbBroadcast = true,不再走IsUbBroadcast常规判定cann_version_headers链接,解析新增的version/metadef_version.h头文件配套算子侧 PR:https://gitcode.com/cann/ops-math/pull/5116(mul/select 算子 PcieThrough 适配),两者需协同合入。
关联的Issue
测试
GetPcieThroughFlag真实分支未编入,兜底路径下isPcieThrough恒为 false,模板调度行为与合入前一致文档更新
不涉及
类型标签