Skip to content

Commit

Permalink
Fix conv2d convert case (#36699)
Browse files Browse the repository at this point in the history
* fix pool2d convert case

* add pool2d convert test case for trt6
  • Loading branch information
JZZ-NOTE committed Oct 26, 2021
1 parent 229bae8 commit db633af
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def is_paddings_valid(self, program_config: ProgramConfig) -> bool:
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:
Expand Down

0 comments on commit db633af

Please sign in to comment.