diff --git a/paddle/fluid/inference/tensorrt/convert/emb_eltwise_layernorm.cc b/paddle/fluid/inference/tensorrt/convert/emb_eltwise_layernorm.cc index 8c0f1896ed06d81b1f0ce86a4de57159c3a2d7e2..0f2e71cd5b5810a3708e429da213672e865aa3ca 100644 --- a/paddle/fluid/inference/tensorrt/convert/emb_eltwise_layernorm.cc +++ b/paddle/fluid/inference/tensorrt/convert/emb_eltwise_layernorm.cc @@ -91,9 +91,9 @@ class EmbEltwiseLayerNormOpConverter : public OpConverter { input_embs, bias, scale, emb_sizes, bias_size, scale_size, hidden, eps); #else - PADDLE_THROW( - platform::errors::Fatal("use EmbEltwiseLayernormPluginDynamic " - "FP16, but GPU doesn't have FP16.")); + plugin = new plugin::EmbEltwiseLayernormPluginDynamic( + input_embs, bias, scale, emb_sizes, bias_size, scale_size, hidden, + eps); #endif } else { plugin = new plugin::EmbEltwiseLayernormPluginDynamic( diff --git a/paddle/fluid/inference/tensorrt/op_teller.cc b/paddle/fluid/inference/tensorrt/op_teller.cc index 3ad46d36de6c3c466beef29a08285e50a11730f7..db077ff306f6e0263398d6ac41afd8789aa8646a 100644 --- a/paddle/fluid/inference/tensorrt/op_teller.cc +++ b/paddle/fluid/inference/tensorrt/op_teller.cc @@ -29,7 +29,6 @@ struct SimpleOpTypeSetTeller : public Teller { teller_set.insert("fused_embedding_eltwise_layernorm"); teller_set.insert("multihead_matmul"); teller_set.insert("skip_layernorm"); - teller_set.insert("slice"); #endif } diff --git a/paddle/fluid/inference/tests/api/trt_dynamic_shape_ernie_test.cc b/paddle/fluid/inference/tests/api/trt_dynamic_shape_ernie_test.cc index 52b3d2abd30dff766522aadd27f8d502e840d015..5fbf0867ba2864c17c15c3368ec8cccdd6221a61 100644 --- a/paddle/fluid/inference/tests/api/trt_dynamic_shape_ernie_test.cc +++ b/paddle/fluid/inference/tests/api/trt_dynamic_shape_ernie_test.cc @@ -120,7 +120,7 @@ void trt_ernie(bool with_fp16, std::vector result) { if (with_fp16) { precision = AnalysisConfig::Precision::kHalf; } - config.EnableTensorRtEngine(1 << 30, 1, 1, precision, false, true); + config.EnableTensorRtEngine(1 << 30, 1, 5, precision, false, true); config.SetTRTDynamicShapeInfo(min_input_shape, max_input_shape, opt_input_shape); std::vector out_data;