From 274997ec863a01bd8a2add3c738b3d9622f6a1a8 Mon Sep 17 00:00:00 2001 From: wenbin Date: Mon, 24 May 2021 07:11:03 +0000 Subject: [PATCH] comments --- paddle/fluid/inference/tensorrt/op_teller.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/fluid/inference/tensorrt/op_teller.cc b/paddle/fluid/inference/tensorrt/op_teller.cc index a382624c8e33d..9df3ec0445ad1 100644 --- a/paddle/fluid/inference/tensorrt/op_teller.cc +++ b/paddle/fluid/inference/tensorrt/op_teller.cc @@ -148,6 +148,7 @@ bool OpTeller::Tell(const framework::ir::Node* node, bool use_no_calib_int8, if (desc.HasAttr("strides")) { const std::vector strides = BOOST_GET_CONST(std::vector, desc.GetAttr("strides")); + // there is no issue if strides.size() less than 2 if (strides.size() > 1) { for (size_t i = 0; i < strides.size(); i++) { if (strides[i] > 1) return false; @@ -243,6 +244,7 @@ bool OpTeller::Tell(const framework::ir::Node* node, bool use_no_calib_int8, if (desc.HasAttr("strides")) { const std::vector strides = BOOST_GET_CONST(std::vector, desc.GetAttr("strides")); + // there is no issue if strides.size() less than 2 if (strides.size() > 1) { for (size_t i = 0; i < strides.size(); i++) { if (strides[i] > 1) return false;