Skip to content

Commit db633af

Browse files
authored
Fix conv2d convert case (#36699)
* fix pool2d convert case * add pool2d convert test case for trt6
1 parent 229bae8 commit db633af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_pool2d.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def is_paddings_valid(self, program_config: ProgramConfig) -> bool:
3333
for index in range(len(ksize)):
3434
if ksize[index] <= paddings[index]:
3535
return False
36+
ver = paddle_infer.get_trt_compile_version()
37+
if ver[0] * 1000 + ver[1] * 100 + ver[0] * 10 < 7000:
38+
if program_config.ops[0].attrs['pooling_type'] == 'avg':
39+
return False
3640
return True
3741

3842
def is_program_valid(self, program_config: ProgramConfig) -> bool:

0 commit comments

Comments
 (0)