Skip to content

Commit 519df32

Browse files
authored
cherry-pick 34040 (#34228)
1 parent a456a1b commit 519df32

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

paddle/fluid/inference/tensorrt/plugin/anchor_generator_op_plugin.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ const char* AnchorGeneratorPlugin::getPluginNamespace() const {
215215

216216
nvinfer1::DataType AnchorGeneratorPlugin::getOutputDataType(
217217
int index, const nvinfer1::DataType* input_type, int nb_inputs) const {
218-
return data_type_;
218+
return input_type[0];
219219
}
220220

221221
bool AnchorGeneratorPlugin::isOutputBroadcastAcrossBatch(
@@ -456,7 +456,7 @@ int AnchorGeneratorPluginDynamic::enqueue(
456456

457457
nvinfer1::DataType AnchorGeneratorPluginDynamic::getOutputDataType(
458458
int index, const nvinfer1::DataType* inputTypes, int nbInputs) const {
459-
return data_type_;
459+
return inputTypes[0];
460460
}
461461

462462
const char* AnchorGeneratorPluginDynamic::getPluginType() const {

paddle/fluid/inference/tensorrt/plugin/roi_align_op_plugin.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ int RoiAlignPluginDynamic::enqueue(const nvinfer1::PluginTensorDesc* inputDesc,
304304

305305
nvinfer1::DataType RoiAlignPluginDynamic::getOutputDataType(
306306
int index, const nvinfer1::DataType* inputTypes, int nbInputs) const {
307-
return data_type_;
307+
return inputTypes[0];
308308
}
309309

310310
const char* RoiAlignPluginDynamic::getPluginType() const {

paddle/fluid/inference/tensorrt/plugin/yolo_box_op_plugin.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ const char* YoloBoxPlugin::getPluginNamespace() const {
295295

296296
nvinfer1::DataType YoloBoxPlugin::getOutputDataType(
297297
int index, const nvinfer1::DataType* input_type, int nb_inputs) const {
298-
return data_type_;
298+
return input_type[0];
299299
}
300300

301301
bool YoloBoxPlugin::isOutputBroadcastAcrossBatch(int output_index,

0 commit comments

Comments
 (0)