From 85c484d85e53ae84867d133a049b431d46ce61d0 Mon Sep 17 00:00:00 2001 From: Daniel Keysers Date: Tue, 29 Oct 2024 07:07:28 -0700 Subject: [PATCH] Reduce time for optimize_test and use exactly one (unpinned) thread. PiperOrigin-RevId: 691005982 --- backprop/optimize_test.cc | 2 +- util/threading.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backprop/optimize_test.cc b/backprop/optimize_test.cc index 494f3b2..36d284b 100644 --- a/backprop/optimize_test.cc +++ b/backprop/optimize_test.cc @@ -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); diff --git a/util/threading.h b/util/threading.h index 26820e1..6dbf806 100644 --- a/util/threading.h +++ b/util/threading.h @@ -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(),