Skip to content

Split pooling inner loops into pad and non-pad regions #665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

robertknight
Copy link
Owner

Optimize MaxPool and AveragePool ops by splitting the inner loop into two parts depending on whether the current output position is affected by padding. This removes branches from the parts that are not affected by padding.

In ocrs's text detection model this makes MaxPool ops 35-40% faster.

Optimize MaxPool and AveragePool ops by splitting the inner loop into two parts
depending on whether the current output position is affected by padding. This
removes branches from the parts that are not affected by padding.

In ocrs's text detection model this makes MaxPool ops 35-40% faster.
@robertknight robertknight merged commit b1507d8 into main Apr 15, 2025
2 checks passed
@robertknight robertknight deleted the pooling-split-pad-region branch April 15, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant