diff --git a/python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_pool2d.py b/python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_pool2d.py index 05545f0b0e95c3542f6f296dfc74d367eecb81d5..ddb96c37db780c214d40e8afca7348cff935ce6c 100644 --- a/python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_pool2d.py +++ b/python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_pool2d.py @@ -33,6 +33,10 @@ class TrtConvertPool2dTest(TrtLayerAutoScanTest): for index in range(len(ksize)): if ksize[index] <= paddings[index]: return False + ver = paddle_infer.get_trt_compile_version() + if ver[0] * 1000 + ver[1] * 100 + ver[0] * 10 < 7000: + if program_config.ops[0].attrs['pooling_type'] == 'avg': + return False return True def is_program_valid(self, program_config: ProgramConfig) -> bool: