From 3dd9d7bb455d319c0cfeafbe2e09b682da1e3aaa Mon Sep 17 00:00:00 2001 From: wenbin Date: Tue, 18 Jan 2022 02:35:55 +0000 Subject: [PATCH] correct compile --- paddle/fluid/inference/tensorrt/op_teller.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/inference/tensorrt/op_teller.cc b/paddle/fluid/inference/tensorrt/op_teller.cc index 4c2feb74bb773..f9b7331d8bdd1 100644 --- a/paddle/fluid/inference/tensorrt/op_teller.cc +++ b/paddle/fluid/inference/tensorrt/op_teller.cc @@ -497,8 +497,8 @@ bool OpTeller::Tell(const framework::ir::Node* node, bool use_no_calib_int8, auto x_var_name = desc.Input("X")[0]; auto* x_var_desc = block->FindVar(x_var_name); const auto x_shape = x_var_desc->GetShape(); + if (axis.size() != x_shape.size()) return false; int dims = x_shape.size(); - if (dims != x_shape.size()) return false; std::vector perm(nvinfer1::Dims::MAX_DIMS); for (int i = 0; i < dims; i++) {