SIGN IN SIGN UP

Default to cores/2 threads in JNI layer (#6042)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/6042

Default to using cores/2 threadpool threads. The long-term plan is to
improve performant core detection in CPUInfo, but for now we can use cores/2 as a sane default.

Based on testing, this is almost universally faster than using all cores, as efficiency cores can be quite slow. In extreme cases, using
all cores can be 10x slower than using cores/2.

This also matches Lite Interpreter's default behavior when it doesn't have a more precise heuristic for the target hardware.

Reviewed By: kirklandsign

Differential Revision: D64107326

fbshipit-source-id: f72f65960d01956bf7621fb03d7106c3c24332af
G
Gregory Comer committed
27330f20c3db60f19f310d557e6dff18725c343e
Parent: 554eebe
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 10/9/2024, 11:43:37 PM