[mlir:Async] Change async-parallel-for block size/count calculation
authorEugene Zhulenev <ezhulenev@google.com>
Tue, 29 Jun 2021 19:56:15 +0000 (12:56 -0700)
committerEugene Zhulenev <ezhulenev@google.com>
Tue, 29 Jun 2021 19:57:11 +0000 (12:57 -0700)
commitc1194c2ec35029f96ce75ab54555dccf2b7e8681
tree9e5be305185e45889a43d48a2b31405035711353
parentf57b2420b2235eca00d5c085a7ef084433140452
[mlir:Async] Change async-parallel-for block size/count calculation

Depends On D105037

Avoid creating too many tasks when the number of workers is large.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D105126
mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp