diff --git a/paddle/fluid/inference/tensorrt/op_teller.cc b/paddle/fluid/inference/tensorrt/op_teller.cc index 4367927bb17344cd27ef68a9eef3db31e1a501c7..4826b5ff27cf9e7826f3568b997b649c8908aa69 100644 --- a/paddle/fluid/inference/tensorrt/op_teller.cc +++ b/paddle/fluid/inference/tensorrt/op_teller.cc @@ -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") {