diff --git a/paddle/fluid/inference/tensorrt/plugin/anchor_generator_op_plugin.cu b/paddle/fluid/inference/tensorrt/plugin/anchor_generator_op_plugin.cu index 01ee86ceb48a9ef022ba73fe0dbdab4a52324cc6..93cb1c29ff2a6f262bcce55917f92399f70d5a7d 100644 --- a/paddle/fluid/inference/tensorrt/plugin/anchor_generator_op_plugin.cu +++ b/paddle/fluid/inference/tensorrt/plugin/anchor_generator_op_plugin.cu @@ -215,7 +215,7 @@ const char* AnchorGeneratorPlugin::getPluginNamespace() const { nvinfer1::DataType AnchorGeneratorPlugin::getOutputDataType( int index, const nvinfer1::DataType* input_type, int nb_inputs) const { - return data_type_; + return input_type[0]; } bool AnchorGeneratorPlugin::isOutputBroadcastAcrossBatch( @@ -456,7 +456,7 @@ int AnchorGeneratorPluginDynamic::enqueue( nvinfer1::DataType AnchorGeneratorPluginDynamic::getOutputDataType( int index, const nvinfer1::DataType* inputTypes, int nbInputs) const { - return data_type_; + return inputTypes[0]; } const char* AnchorGeneratorPluginDynamic::getPluginType() const { diff --git a/paddle/fluid/inference/tensorrt/plugin/roi_align_op_plugin.cu b/paddle/fluid/inference/tensorrt/plugin/roi_align_op_plugin.cu index 6e7ed0054f502ea014d3648ac0be22c167987735..61e9144b9c8d42acc3b8914a28d9583e0a475b8b 100644 --- a/paddle/fluid/inference/tensorrt/plugin/roi_align_op_plugin.cu +++ b/paddle/fluid/inference/tensorrt/plugin/roi_align_op_plugin.cu @@ -304,7 +304,7 @@ int RoiAlignPluginDynamic::enqueue(const nvinfer1::PluginTensorDesc* inputDesc, nvinfer1::DataType RoiAlignPluginDynamic::getOutputDataType( int index, const nvinfer1::DataType* inputTypes, int nbInputs) const { - return data_type_; + return inputTypes[0]; } const char* RoiAlignPluginDynamic::getPluginType() const { diff --git a/paddle/fluid/inference/tensorrt/plugin/yolo_box_op_plugin.cu b/paddle/fluid/inference/tensorrt/plugin/yolo_box_op_plugin.cu index 13d07e774036a48b0ed6e3c91b168eaab4461df5..fb2712e823a85ef841e3115d2123b9f56ce22f84 100644 --- a/paddle/fluid/inference/tensorrt/plugin/yolo_box_op_plugin.cu +++ b/paddle/fluid/inference/tensorrt/plugin/yolo_box_op_plugin.cu @@ -295,7 +295,7 @@ const char* YoloBoxPlugin::getPluginNamespace() const { nvinfer1::DataType YoloBoxPlugin::getOutputDataType( int index, const nvinfer1::DataType* input_type, int nb_inputs) const { - return data_type_; + return input_type[0]; } bool YoloBoxPlugin::isOutputBroadcastAcrossBatch(int output_index,