Revert "Reland "Reland "pthreadpool: Integrate with Jobs API"""

This reverts commit bbef2b40c9e20a4c8ad121ddac95abe6347389f9.

Reason for revert: Speculative fix for crbug.com/1454009, multiple
tests are failing

Original change's description:
> Reland "Reland "pthreadpool: Integrate with Jobs API""
>
> This is a reland of commit 9fd417a399dfb28ace5add2fa7df714f70de5bb6
>
> The pthreadpoool library is built with "sanitizers:cfi_icall_disable"
> config that would cause pthreadpool_unittests failure on the Linux CFI
> bot, such as [1]. This reland enables the cfi-icall sanitizer flag by
> removing this config. It also fixes a pointer cast issue in
> pthreadpool_unittests.
>
> [1]: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20CFI/25348/overview
>
> Original change's description:
> > Reland "pthreadpool: Integrate with Jobs API"
> >
> > This is a reland of commit e29465230b2f97fc64d51395bf9353e2ab266570
> >
> > This reland fixes the build issue on win-arm64 bots, such as [1], by
> > declaring the missing arm64 intrinsics if the arm64intr.h is not
> > included correctly due to LLVM issue [2]. Once the LLVM issue is
> > resolved, this work-around should be removed.
> >
> > [1]: https://ci.chromium.org/b/8779781271284246545
> > [2]: https://github.com/llvm/llvm-project/issues/62942
> >
> > 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: Icab18064790a70164e47b52939add5774bf49ec7
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4571505
> > Commit-Queue: ningxin hu <ningxin.hu@intel.com>
> > Reviewed-by: Robert Ogden <robertogden@chromium.org>
> > Reviewed-by: danakj <danakj@chromium.org>
> > Reviewed-by: Austin Sullivan <asully@chromium.org>
> > Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
> > Reviewed-by: Gabriel Charette <gab@chromium.org>
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1153620}
>
> Bug: 1228275,1273291
> Change-Id: Ib238c05d703c1f8ac191ea89cb353c39a90804d7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4593640
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Robert Ogden <robertogden@chromium.org>
> Reviewed-by: Austin Sullivan <asully@chromium.org>
> Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
> Commit-Queue: ningxin hu <ningxin.hu@intel.com>
> Cr-Commit-Position: refs/heads/main@{#1155813}

Bug: 1228275,1273291,1454009
Change-Id: I3dce136ddeece69bf7d62640835b78f6a653247f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4607301
Reviewed-by: Anna Tsvirchkova <atsvirchkova@google.com>
Owners-Override: Anna Tsvirchkova <atsvirchkova@google.com>
Commit-Queue: Anna Tsvirchkova <atsvirchkova@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Dominic Battre <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1156100}
19 files changed
tree: 6e1d569f3b03a73360e000db9fa839ce36746fb5
  1. android_webview/
  2. apps/
  3. ash/
  4. base/
  5. build/
  6. build_overrides/
  7. buildtools/
  8. cc/
  9. chrome/
  10. chromecast/
  11. chromeos/
  12. codelabs/
  13. components/
  14. content/
  15. courgette/
  16. crypto/
  17. dbus/
  18. device/
  19. docs/
  20. extensions/
  21. fuchsia_web/
  22. gin/
  23. google_apis/
  24. google_update/
  25. gpu/
  26. headless/
  27. infra/
  28. ios/
  29. ipc/
  30. media/
  31. mojo/
  32. native_client_sdk/
  33. net/
  34. pdf/
  35. ppapi/
  36. printing/
  37. remoting/
  38. rlz/
  39. sandbox/
  40. services/
  41. skia/
  42. sql/
  43. storage/
  44. styleguide/
  45. testing/
  46. third_party/
  47. tools/
  48. ui/
  49. url/
  50. weblayer/
  51. .clang-format
  52. .clang-tidy
  53. .eslintrc.js
  54. .git-blame-ignore-revs
  55. .gitattributes
  56. .gitignore
  57. .gn
  58. .mailmap
  59. .rustfmt.toml
  60. .vpython3
  61. .yapfignore
  62. ATL_OWNERS
  63. AUTHORS
  64. BUILD.gn
  65. CODE_OF_CONDUCT.md
  66. codereview.settings
  67. DEPS
  68. DIR_METADATA
  69. LICENSE
  70. LICENSE.chromium_os
  71. OWNERS
  72. PRESUBMIT.py
  73. PRESUBMIT_test.py
  74. PRESUBMIT_test_mocks.py
  75. README.md
  76. WATCHLISTS
README.md

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure .

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.

If you found a bug, please file it at https://crbug.com/new.