Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion paddle/fluid/inference/tensorrt/op_teller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down