From b854f2599ed0f13e6aab9720d0169894b13fb8cb Mon Sep 17 00:00:00 2001 From: xiaoxiaohehe001 <49090790+xiaoxiaohehe001@users.noreply.github.com> Date: Tue, 10 Jan 2023 18:37:45 +0800 Subject: [PATCH] fix_generic_fp16 (#49682) --- paddle/fluid/inference/tensorrt/plugin/generic_plugin.cu | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/paddle/fluid/inference/tensorrt/plugin/generic_plugin.cu b/paddle/fluid/inference/tensorrt/plugin/generic_plugin.cu index 88bb7e5f53..297efc5fff 100644 --- a/paddle/fluid/inference/tensorrt/plugin/generic_plugin.cu +++ b/paddle/fluid/inference/tensorrt/plugin/generic_plugin.cu @@ -332,17 +332,12 @@ bool GenericPlugin::supportsFormatCombination( if (pos == 3) return in_out[0].type == in_out[pos].type && in_out[0].format == in_out[pos].format; - } else if (op_desc_.Type() == "pad3d") { + } else { return (in_out[pos].type == nvinfer1::DataType::kFLOAT || (isFp16Supported() && in_out[pos].type == nvinfer1::DataType::kHALF)) && (in_out[pos].format == nvinfer1::TensorFormat::kLINEAR) && (in_out[0].type == in_out[pos].type); - } else { - return (in_out[pos].type == nvinfer1::DataType::kFLOAT || - (isFp16Supported() && - in_out[pos].type == nvinfer1::DataType::kHALF)) && - (in_out[pos].format == nvinfer1::TensorFormat::kLINEAR); } } -- GitLab