Reduce time for optimize_test and use exactly one (unpinned) thread.

PiperOrigin-RevId: 691013413
This commit is contained in:
Daniel Keysers 2024-10-29 07:36:43 -07:00 committed by Copybara-Service
parent 583bd93e9a
commit ed4091921f
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@
namespace gcpp {
TEST(OptimizeTest, GradientDescent) {
NestedPools pools(1);
NestedPools pools(1, /*pin=*/0, BoundedSlice(0, 1), BoundedSlice(0, 1));
hwy::ThreadPool& pool = pools.Pool();
std::mt19937 gen(42);

View File

@ -361,7 +361,7 @@ class NestedPools {
// only impose upper bounds on the number of detected packages and clusters
// rather than defining the actual number of threads.
//
// `pin` is 0 or 1 to force enable/disable, or -1 to choose automatically.
// `pin` is 0 or 1 to force disable/enable, or -1 to choose automatically.
NestedPools(size_t max_threads, int pin = -1,
BoundedSlice package_slice = BoundedSlice(),
BoundedSlice cluster_slice = BoundedSlice(),