From 6e5917e418e3432cc38c45f65f6d595f9ba0ef2b Mon Sep 17 00:00:00 2001 From: Zhang Jun Date: Fri, 30 Dec 2022 15:54:36 +0800 Subject: [PATCH] [inference][trt] update Convolution to ConvolutionNd (#47653) * update conv to convNd * trigger ci --- paddle/fluid/inference/tensorrt/convert/conv2d_op.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/inference/tensorrt/convert/conv2d_op.cc b/paddle/fluid/inference/tensorrt/convert/conv2d_op.cc index b8f9b22fc7..314e5390bd 100644 --- a/paddle/fluid/inference/tensorrt/convert/conv2d_op.cc +++ b/paddle/fluid/inference/tensorrt/convert/conv2d_op.cc @@ -142,7 +142,8 @@ void ConvertConv2d(TensorRTEngine* engine, layer, platform::errors::Fatal("TensorRT create conv2d/conv2d_transpose" " layer failed.")); - layer->setStride(nv_strides); + layer->setStrideNd(nv_strides); + layer->setPrePadding(nv_pre_paddings); if (output_padding.size() > 0) { nv_post_paddings.d[0] -= output_padding[0]; @@ -189,7 +190,7 @@ class Conv2dOpConverter : public OpConverter { TensorRTEngine::Weight& weight, TensorRTEngine::Weight& bias) -> nvinfer1::IConvolutionLayer* { auto* layer = TRT_ENGINE_ADD_LAYER(engine_, - Convolution, + ConvolutionNd, *inputs, n_output, ksize, -- GitLab