From 82fb63ebb7661e37e92cf52e0752944640084a55 Mon Sep 17 00:00:00 2001 From: wangxinxin08 <69842442+wangxinxin08@users.noreply.github.com> Date: Fri, 29 Oct 2021 12:21:27 +0800 Subject: [PATCH] fix dcnv2 trt8 compile error (#36850) --- .../inference/tensorrt/plugin/deformable_conv_op_plugin.cu | 4 +--- .../inference/tensorrt/plugin/deformable_conv_op_plugin.h | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/inference/tensorrt/plugin/deformable_conv_op_plugin.cu b/paddle/fluid/inference/tensorrt/plugin/deformable_conv_op_plugin.cu index b090ad91454..760f379eb07 100644 --- a/paddle/fluid/inference/tensorrt/plugin/deformable_conv_op_plugin.cu +++ b/paddle/fluid/inference/tensorrt/plugin/deformable_conv_op_plugin.cu @@ -360,7 +360,7 @@ void gemm_impl(cublasHandle_t handle, cublasOperation_t transa, template int DeformableConvPlugin::enqueue_impl(int batch_size, const void* const* inputs, - void** outputs, void* workspace, + void* const* outputs, void* workspace, cudaStream_t stream) { const T* input = reinterpret_cast(inputs[0]); const T* offset = reinterpret_cast(inputs[1]); @@ -527,8 +527,6 @@ nvinfer1::IPluginV2Ext* DeformableConvPlugin::clone() const TRT_NOEXCEPT { offset_dim_, mask_dim_, output_dim_); } -DeformableConvPluginCreator::DeformableConvPluginCreator() TRT_NOEXCEPT {} - void DeformableConvPluginCreator::setPluginNamespace(const char* lib_namespace) TRT_NOEXCEPT { namespace_ = std::string(lib_namespace); diff --git a/paddle/fluid/inference/tensorrt/plugin/deformable_conv_op_plugin.h b/paddle/fluid/inference/tensorrt/plugin/deformable_conv_op_plugin.h index 9b04d6fb8ca..8ba19288ce5 100644 --- a/paddle/fluid/inference/tensorrt/plugin/deformable_conv_op_plugin.h +++ b/paddle/fluid/inference/tensorrt/plugin/deformable_conv_op_plugin.h @@ -91,8 +91,8 @@ class DeformableConvPlugin : public nvinfer1::IPluginV2Ext { private: template - int enqueue_impl(int batch_size, const void* const* inputs, void** outputs, - void* workspace, cudaStream_t stream); + int enqueue_impl(int batch_size, const void* const* inputs, + void* const* outputs, void* workspace, cudaStream_t stream); nvinfer1::Weights copyToDevice(const void* hostData, size_t count); void serializeFromDevice(void** hostBuffer, const nvinfer1::Weights& deviceWeights) const; @@ -119,7 +119,7 @@ class DeformableConvPlugin : public nvinfer1::IPluginV2Ext { class DeformableConvPluginCreator : public nvinfer1::IPluginCreator { public: - DeformableConvPluginCreator(); + DeformableConvPluginCreator() = default; ~DeformableConvPluginCreator() override = default; void setPluginNamespace(const char* lib_namespace) TRT_NOEXCEPT override; -- GitLab