PcieThrough(PCIe 直通)场景需要 mul、select 算子适配:select 的 SIMT tiling 模板不支持该场景,需要在 tiling 阶段识别并回退到通用模板;同时两个算子需要在 infershape 注册侧标记 PcieThrough 支持能力,否则直通场景无法调度到这些算子。
PcieThrough 特性配套需求,与 opbase 仓库 broadcast 模板适配 PR(https://gitcode.com/cann/opbase/pull/788)协同提出。
SetSupportPcieThrough
SelectSimtTiling::IsCapable()
IsPcieThrough()
SelectTiling
context_->GetPcieThroughFlag()
IMPL_OP_INFERSHAPE(Mul)
IMPL_OP_INFERSHAPE(Select)
SetSupportPcieThrough()
关联 PR:https://gitcode.com/cann/ops-math/pull/5116
/assign @hahaha22
Backgroud(背景信息)
PcieThrough(PCIe 直通)场景需要 mul、select 算子适配:select 的 SIMT tiling 模板不支持该场景,需要在 tiling 阶段识别并回退到通用模板;同时两个算子需要在 infershape 注册侧标记 PcieThrough 支持能力,否则直通场景无法调度到这些算子。
Origin(信息来源)
PcieThrough 特性配套需求,与 opbase 仓库 broadcast 模板适配 PR(https://gitcode.com/cann/opbase/pull/788)协同提出。
Benefit / Necessity (价值/作用)
SetSupportPcieThrough标记使能框架侧直通调度Design(设计方案)
SelectSimtTiling::IsCapable()前置IsPcieThrough()判断,PcieThrough 场景返回 false,回退到低优先级SelectTiling(broadcast 模板,PcieThrough 下强制 UB BRC)IsPcieThrough()经context_->GetPcieThroughFlag()获取标志,METADEF_VERSION_NUM >= 90200000 编译期门控,低版本兜底 falseIMPL_OP_INFERSHAPE(Mul)/IMPL_OP_INFERSHAPE(Select)高版本 SDK 下链式调用SetSupportPcieThrough()关联 PR:https://gitcode.com/cann/ops-math/pull/5116