未验证 提交 11f5a400 编写于 作者: W wenbin 提交者: GitHub

correct conditions of gather in opteller (#33999)

* correct conditions of gather in opteller

* test=develop

* test=allcase
上级 9f0411f1
......@@ -314,8 +314,13 @@ bool OpTeller::Tell(const framework::ir::Node* node, bool use_no_calib_int8,
}
if (op_type == "gather") {
if (!with_dynamic_shape) return false;
auto inputs = desc.InputArgumentNames();
for (auto& input : inputs) {
if (input == "Axis" && desc.Input("Axis").size() > 0) return false;
}
// current not support axis from input, use default 0
if (!with_dynamic_shape || desc.Input("Axis").size() > 0) return false;
if (desc.GetAttrIfExists<int>("axis")) return false;
}
if (op_type == "gather_nd") {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册