已关闭
[Requirement|需求建议]: 新增16个算子的TensorFlow插件注册 #5447
Nice try创建于  8 天前关闭于  6 天前
Nice try
Nice try成员
8 天前 创建

Backgroud(背景信息)

PReluGrad、Centralization、DynamicAUGRU/Grad、DynamicGRUV2/Grad、DynamicRNNGrad、LRN/Grad、LRUCacheV2、MaxPoolGradGrad、BNInferGrad、MaxPoolGradGradWithArgmax、MaxPoolV2/MaxPool、Dequantize 共 16 个算子缺少 TensorFlow 框架插件注册,导致这些算子在 TensorFlow 图解析时无法自动映射。本次需求为这 16 个算子补齐 TF 插件注册。

Origin(信息来源)

来源于 cann/ops-nn 仓库算子 TF 插件注册补齐工作(关联 PR #9643)。

Benefit / Necessity (价值/作用)

补齐后,TensorFlow 图中的上述算子可通过 AutoMappingByOpFn 自动映射为昇腾算子并走 TVM 执行路径,支持相关模型在昇腾 NPU 上运行。

Design(设计方案)

每个算子新增 {op}_tf_plugin.cpp 文件,使用 REGISTER_CUSTOM_OP 注册,设置 .FrameworkType(TENSORFLOW).OriginOpType("OpName").ParseParamsByOperatorFn(AutoMappingByOpFn).ImplyType(ImplyType::TVM),与仓库已有 *_tf_plugin.cpp 文件模式完全一致。

关联 PR:https://gitcode.com/cann/ops-nn/pull/9643

likedislike
Nice tryNice try成员
8 天前 添加了label:requirement
Nice try
Nice try成员
8 天前 评论:

/assign @Nice_try

likedislike
CANN-robotCANN-robot成员
8 天前 将 Nice_try 设为负责人
CANN-robotCANN-robot成员
6 天前 关闭了 issue
CANN-robotCANN-robot成员
6 天前 添加了label:resolved