Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "pthreadpool: Integrate with Jobs API"
This reverts commit e294652. Reason for revert: LUCI Bisection identified this CL as the culprit of a build failure. See the analysis: https://luci-bisection.appspot.com/analysis/b/8779781271284246545 Sample failed build: https://ci.chromium.org/b/8779781271284246545 If this is a false positive, please report it at https://bugs.chromium.org/p/chromium/issues/entry?comment=Analysis%3A+https%3A%2F%2Fluci-bisection.appspot.com%2Fanalysis%2Fb%2F8779781271284246545&components=Tools%3ETest%3EFindit&labels=LUCI-Bisection-Wrong%2CPri-3%2CType-Bug&status=Available&summary=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F4467727 Original change's description: > pthreadpool: Integrate with Jobs API > > pthreadpool is used by XNNPACK which in turns supports TFLite and WebNN > to execute each neural network operator of a model by multiple threads > in parallel. > > To avoid creating an unmanaged thread pool owned by pthreadpool > implementation, this CL implements a shim of `pthreadpool_parallelize()` > that maps the pthreadpool thread tasks to work items and uses Jobs API > (`base::PostJob`) to schedule these work items with Chromium's > `base::ThreadPool` workers. > > According to the test result on a multi-core device, when scheduling 4 > work items with `base::ThreadPool`, XNNPACK model inference performance > could get ~1.9X speedup for MobileNet V2 and ~2.8X speedup for ResNet50 > V2 compared to single thread execution. And the test result also shows > using Jobs API shim could achieve 85% and 97% performance of using > pthreadpool own thread pool implementation for MobileNet V2 and ResNet50 > V2 respectively. > > This CL also enables pthreadpool_unittests with Jobs API integration on > Windows and Linux bots that aligns with the `build_tflite_with_xnnpack` > build flag. > > > Bug: 1228275,1273291 > Change-Id: I1152d1e93885399b453c87be18a432e6c118054e > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4467727 > Reviewed-by: danakj <danakj@chromium.org> > Commit-Queue: ningxin hu <ningxin.hu@intel.com> > Reviewed-by: Brian Sheedy <bsheedy@chromium.org> > Reviewed-by: Robert Ogden <robertogden@chromium.org> > Reviewed-by: Sami Kyöstilä <skyostil@chromium.org> > Reviewed-by: Austin Sullivan <asully@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1150206} > Bug: 1228275,1273291 Change-Id: I60ce5354a3602eeaae27557d17d91017b940b137 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4567437 Commit-Queue: luci-bisection@appspot.gserviceaccount.com <luci-bisection@appspot.gserviceaccount.com> Owners-Override: luci-bisection@appspot.gserviceaccount.com <luci-bisection@appspot.gserviceaccount.com> Bot-Commit: luci-bisection@appspot.gserviceaccount.com <luci-bisection@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1150225}
- Loading branch information