Skip to content

Commit

Permalink
forbid conv op whose weight is not a persistable weight into Paddle-TRT
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoutianzi666 committed Dec 11, 2022
1 parent 8fb829b commit 2aaea02
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions paddle/fluid/inference/tensorrt/op_teller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,15 @@ struct SimpleOpTypeSetTeller : public Teller {
}
}
#endif
auto* block = desc.Block();
if (block) {
auto* filter_var_desc = block->FindVar(desc.Input("Filter")[0]);
if (!filter_var_desc->Persistable()) {
VLOG(3) << "Trt not support filter is a intermediate tensor in "
"conv2d op.";
return false;
}
}
}

if (op_type == "deformable_conv") {
Expand Down

0 comments on commit 2aaea02

Please sign in to comment.