Skip to content

Commit

Permalink
fix trt convert conv2d skip
Browse files Browse the repository at this point in the history
  • Loading branch information
JZZ-NOTE committed Jan 18, 2022
1 parent 2c47678 commit 62b382d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ def is_program_valid(self, program_config: ProgramConfig) -> bool:
1] * attrs[0]['groups']:
return False

ver = paddle_infer.get_trt_compile_version()
if ver[0] * 1000 + ver[1] * 100 + ver[0] * 10 < 7000:
if attrs[0]['padding_algorithm'] == 'SAME' and (
attrs[0]['strides'][0] > 1 or attrs[0]['strides'][1] > 1):
return False

return True

def sample_program_configs(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ def is_program_valid(self, program_config: ProgramConfig) -> bool:
if attrs[0]['groups'] <= 1:
return False

ver = paddle_infer.get_trt_compile_version()
if ver[0] * 1000 + ver[1] * 100 + ver[0] * 10 < 7000:
if attrs[0]['padding_algorithm'] == 'SAME' and (
attrs[0]['strides'][0] > 1 or attrs[0]['strides'][1] > 1):
return False

return True

def sample_program_configs(self):
Expand Down

1 comment on commit 62b382d

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.