From d7855fe80676da0ee000703a5bce109f9df23c46 Mon Sep 17 00:00:00 2001 From: feng_shuai Date: Tue, 3 Jan 2023 13:39:42 +0800 Subject: [PATCH] cherry-pick:Some version of TensorRT don't support qkv_plugin (#49425) * cherry-pick:Some version of TensorRT don't support qkv_plugin * cherry-pick:support coverage CI --- paddle/fluid/inference/tensorrt/op_teller.cc | 6 ++++-- .../ir/inference/test_trt_convert_multihead_matmul.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/inference/tensorrt/op_teller.cc b/paddle/fluid/inference/tensorrt/op_teller.cc index f4250173292..9c1939a064a 100644 --- a/paddle/fluid/inference/tensorrt/op_teller.cc +++ b/paddle/fluid/inference/tensorrt/op_teller.cc @@ -1708,8 +1708,10 @@ struct SimpleOpTypeSetTeller : public Teller { return false; } } else { -#if !IS_TRT_VERSION_GE(8000) - VLOG(3) << "The version of TRT must be greater than 8000"; +#if (IS_TRT_VERSION_GE(8000) && IS_TRT_VERSION_LT(8100)) || \ + (IS_TRT_VERSION_LT(7200)) + VLOG(3) << "There are some bugs in v8.0.* and the versions lower than " + "v7.2 are not supported"; return false; #endif } diff --git a/python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_multihead_matmul.py b/python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_multihead_matmul.py index 5bc980a227f..9731b7667f7 100644 --- a/python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_multihead_matmul.py +++ b/python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_multihead_matmul.py @@ -808,7 +808,7 @@ class TrtConvertVitToMultiHeadMatmulTest(TrtLayerAutoScanTest): for batch in [2, 4]: self.batch = batch - for length in [64, 384]: + for length in [197]: self.length = length ops_config = [ { -- GitLab