Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.
ops-transformer 仓库中 MoeComputeExpertTokens、MoeFinalizeRouting、MoeFinalizeRoutingV2、MoeInitRouting、MoeInitRoutingQuant 共 5 个 MoE(Mixture of Experts)系列算子目前仅有 NPU 侧实现,缺少 op_graph fallback(Host 侧执行)实现。
在不支持 NPU 侧执行的部署形态或图执行场景下,上述算子无法回落到 Host 侧调用 opapi 执行,导致整图执行失败,影响 MoE 模型在相关环境下的可用性。
为上述 5 个算子各新增 op_graph/fallback_*.cpp 实现文件:
op_graph/fallback_*.cpp
IMPL_OP(OpName).OpExecuteFunc(...)
EXEC_OPAPI_CMD
/assign @wuxiyuan
Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.
Backgroud(背景信息)
ops-transformer 仓库中 MoeComputeExpertTokens、MoeFinalizeRouting、MoeFinalizeRoutingV2、MoeInitRouting、MoeInitRoutingQuant 共 5 个 MoE(Mixture of Experts)系列算子目前仅有 NPU 侧实现,缺少 op_graph fallback(Host 侧执行)实现。
在不支持 NPU 侧执行的部署形态或图执行场景下,上述算子无法回落到 Host 侧调用 opapi 执行,导致整图执行失败,影响 MoE 模型在相关环境下的可用性。
Design(设计方案)
为上述 5 个算子各新增
op_graph/fallback_*.cpp实现文件:IMPL_OP(OpName).OpExecuteFunc(...)注册宿主侧执行函数EXEC_OPAPI_CMD透传调用对应 aclnn opapi 接口,返回值正确传播