Skip to content

Commit

Permalink
Reduce time for optimize_test and use exactly one (unpinned) thread.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 691005982
  • Loading branch information
danielkeysers authored and copybara-github committed Oct 29, 2024
1 parent 583bd93 commit 85c484d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backprop/optimize_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion util/threading.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 85c484d

Please sign in to comment.