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

Remove SchedulingParams variants of ThreadPool::TryParallelFor #5050

Merged
merged 4 commits into from
Sep 3, 2020

Conversation

tlh20
Copy link
Contributor

@tlh20 tlh20 commented Sep 3, 2020

Description: Simplify the range of parallel loops implemented in the thread pool by removing the variants based on SchedulingParams. This leaves the variant that takes a simple double to express costs, and the variant that takes a TensorOpCost struct.

Motivation and Context
The parallel loop variants taking a SchedulingParams were essentially unused, but supporting them introduced complexity in writing and testing other changes to the thread pool implementation. The single use is in the gelu.cc microbenchmark which uses SchedulingParams to force a fixed 4096-size chunk for work distribution. I updated the microbenchmark to do this chunking explicitly, following the code in onnxruntime/contrib_ops/cpu/bert/bias_gelu.cc

@tlh20 tlh20 requested review from snnn and pranavsharma September 3, 2020 12:00
@tlh20 tlh20 marked this pull request as ready for review September 3, 2020 12:00
@tlh20 tlh20 requested a review from a team as a code owner September 3, 2020 12:00
@tlh20 tlh20 changed the title Dev/tiharr removesched Remove SchedulingParams variants of ThreadPool::TryParallelFor Sep 3, 2020
@snnn snnn merged commit bbb9d92 into master Sep 3, 2020
@snnn snnn deleted the dev/tiharr-removesched branch September 3, 2020 16:04
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.

2 participants