未验证 提交 6e5917e4 编写于 作者: Z Zhang Jun 提交者: GitHub

[inference][trt] update Convolution to ConvolutionNd (#47653)

* update conv to convNd

* trigger ci
上级 802c5797
...@@ -142,7 +142,8 @@ void ConvertConv2d(TensorRTEngine* engine, ...@@ -142,7 +142,8 @@ void ConvertConv2d(TensorRTEngine* engine,
layer, layer,
platform::errors::Fatal("TensorRT create conv2d/conv2d_transpose" platform::errors::Fatal("TensorRT create conv2d/conv2d_transpose"
" layer failed.")); " layer failed."));
layer->setStride(nv_strides); layer->setStrideNd(nv_strides);
layer->setPrePadding(nv_pre_paddings); layer->setPrePadding(nv_pre_paddings);
if (output_padding.size() > 0) { if (output_padding.size() > 0) {
nv_post_paddings.d[0] -= output_padding[0]; nv_post_paddings.d[0] -= output_padding[0];
...@@ -189,7 +190,7 @@ class Conv2dOpConverter : public OpConverter { ...@@ -189,7 +190,7 @@ class Conv2dOpConverter : public OpConverter {
TensorRTEngine::Weight& weight, TensorRTEngine::Weight& weight,
TensorRTEngine::Weight& bias) -> nvinfer1::IConvolutionLayer* { TensorRTEngine::Weight& bias) -> nvinfer1::IConvolutionLayer* {
auto* layer = TRT_ENGINE_ADD_LAYER(engine_, auto* layer = TRT_ENGINE_ADD_LAYER(engine_,
Convolution, ConvolutionNd,
*inputs, *inputs,
n_output, n_output,
ksize, ksize,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册