diff --git a/paddle/fluid/inference/tensorrt/plugin/emb_eltwise_layernorm_plugin.cu b/paddle/fluid/inference/tensorrt/plugin/emb_eltwise_layernorm_plugin.cu index 313d58ce97ececdeb43bfc0d8cd850a1e4233cbc..82f4420a2a04cd5593b0f330713b422b79a00ee2 100644 --- a/paddle/fluid/inference/tensorrt/plugin/emb_eltwise_layernorm_plugin.cu +++ b/paddle/fluid/inference/tensorrt/plugin/emb_eltwise_layernorm_plugin.cu @@ -32,9 +32,7 @@ namespace plugin { template EmbEltwiseLayernormPluginDynamicImpl< - T>::~EmbEltwiseLayernormPluginDynamicImpl() { - this->terminate(); -} + T>::~EmbEltwiseLayernormPluginDynamicImpl() {} inline half fp32tofp16(float x) { return static_cast(x); } diff --git a/paddle/fluid/inference/tensorrt/plugin/qkv_to_context_plugin.cu b/paddle/fluid/inference/tensorrt/plugin/qkv_to_context_plugin.cu index cdf353465c818ac71753304cc1c3596392e6594e..8e59fc1355a7579273fd6abac66f5ea70f86c6b1 100644 --- a/paddle/fluid/inference/tensorrt/plugin/qkv_to_context_plugin.cu +++ b/paddle/fluid/inference/tensorrt/plugin/qkv_to_context_plugin.cu @@ -192,11 +192,8 @@ bool QkvToContextPluginDynamic::supportsFormatCombination( if (pos == 0) { if (with_fp16_) { #ifdef TRT_PLUGIN_FP16_AVALIABLE - return ( -#if IS_TRT_VERSION_LT(8000) - in.type == nvinfer1::DataType::kFLOAT || -#endif - in.type == nvinfer1::DataType::kHALF) && + return (in.type == nvinfer1::DataType::kFLOAT || + in.type == nvinfer1::DataType::kHALF) && (in.format == nvinfer1::TensorFormat::kLINEAR); #else return (in.type == nvinfer1::DataType::kFLOAT) && diff --git a/paddle/fluid/inference/tensorrt/plugin/skip_layernorm_op_plugin.cu b/paddle/fluid/inference/tensorrt/plugin/skip_layernorm_op_plugin.cu index 21e2660c9413d12f3112ef30eb2091304aceb4a1..fb14749f3d1dba991ef6a0eac1459413a7d363b1 100644 --- a/paddle/fluid/inference/tensorrt/plugin/skip_layernorm_op_plugin.cu +++ b/paddle/fluid/inference/tensorrt/plugin/skip_layernorm_op_plugin.cu @@ -73,11 +73,8 @@ bool SkipLayerNormPluginDynamic::supportsFormatCombination( if (pos == 0) { if (with_fp16_) { #ifdef TRT_PLUGIN_FP16_AVALIABLE - return ( -#if IS_TRT_VERSION_LT(8000) - in.type == nvinfer1::DataType::kFLOAT || -#endif - in.type == nvinfer1::DataType::kHALF) && + return (in.type == nvinfer1::DataType::kFLOAT || + in.type == nvinfer1::DataType::kHALF) && (in.format == nvinfer1::TensorFormat::kLINEAR); #else return (in.type == nvinfer1::DataType::kFLOAT) && diff --git a/paddle/fluid/inference/tensorrt/plugin/slice_op_plugin.cu b/paddle/fluid/inference/tensorrt/plugin/slice_op_plugin.cu index 2980aa2c7598c299978550c06876b020cd60816e..2b6541c5515cec6a1cea4355af28b8cde3ca5d95 100644 --- a/paddle/fluid/inference/tensorrt/plugin/slice_op_plugin.cu +++ b/paddle/fluid/inference/tensorrt/plugin/slice_op_plugin.cu @@ -83,11 +83,8 @@ SlicePlugin *SlicePlugin::clone() const TRT_NOEXCEPT { bool SlicePlugin::supportsFormat( nvinfer1::DataType type, nvinfer1::PluginFormat format) const TRT_NOEXCEPT { if (with_fp16_) { - return (( -#if IS_TRT_VERSION_LT(8000) - type == nvinfer1::DataType::kFLOAT || -#endif - type == nvinfer1::DataType::kHALF) && + return ((type == nvinfer1::DataType::kFLOAT || + type == nvinfer1::DataType::kHALF) && (format == nvinfer1::PluginFormat::kLINEAR)); } else { return ((type == nvinfer1::DataType::kFLOAT) && @@ -287,11 +284,8 @@ bool SlicePluginDynamic::supportsFormatCombination( const nvinfer1::PluginTensorDesc &in = in_out[pos]; if (pos == 0) { if (with_fp16_) { - return ( -#if IS_TRT_VERSION_LT(8000) - in.type == nvinfer1::DataType::kFLOAT || -#endif - in.type == nvinfer1::DataType::kHALF) && + return (in.type == nvinfer1::DataType::kFLOAT || + in.type == nvinfer1::DataType::kHALF) && (in.format == nvinfer1::TensorFormat::kLINEAR); } else { return (in.type == nvinfer1::DataType::kFLOAT) &&