Skip to content
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

Parallelize AveragePool op #138

Merged
merged 1 commit into from
May 1, 2024
Merged

Parallelize AveragePool op #138

merged 1 commit into from
May 1, 2024

Conversation

robertknight
Copy link
Owner

@robertknight robertknight commented May 1, 2024

Generalize the existing parallel MaxPool implementation and use it to implement both MaxPool and AveragePool. This should generalize to LpPool in future too. The result is still far from optimal, but it serves as a starting point for implementing pooling ops for each reduction type (max, average, lp) and future data type.

On a Yolov9e ONNX model taken from HuggingFace this reduces time in AveragePool ops by about 2x on my system (30ms -> 14ms with a 256x256 input).

Generalize the existing parallel MaxPool implementation and use it to implement
both MaxPool and AveragePool. The result is still far from optimal, but it
serves as a starting point for implementing pooling ops for each reduction type
(max, average, lp) and future data type.
@robertknight robertknight merged commit 96c55c3 into main May 1, 2024
2 checks passed
@robertknight robertknight deleted the generic-pool branch May 1, 2024 07:49
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