mirror of https://github.com/google/gemma.cpp.git
Reduce time for optimize_test and use exactly one (unpinned) thread.
PiperOrigin-RevId: 691013413
This commit is contained in:
parent
583bd93e9a
commit
ed4091921f
|
|
@ -39,7 +39,7 @@
|
||||||
namespace gcpp {
|
namespace gcpp {
|
||||||
|
|
||||||
TEST(OptimizeTest, GradientDescent) {
|
TEST(OptimizeTest, GradientDescent) {
|
||||||
NestedPools pools(1);
|
NestedPools pools(1, /*pin=*/0, BoundedSlice(0, 1), BoundedSlice(0, 1));
|
||||||
hwy::ThreadPool& pool = pools.Pool();
|
hwy::ThreadPool& pool = pools.Pool();
|
||||||
std::mt19937 gen(42);
|
std::mt19937 gen(42);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ class NestedPools {
|
||||||
// only impose upper bounds on the number of detected packages and clusters
|
// only impose upper bounds on the number of detected packages and clusters
|
||||||
// rather than defining the actual number of threads.
|
// 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,
|
NestedPools(size_t max_threads, int pin = -1,
|
||||||
BoundedSlice package_slice = BoundedSlice(),
|
BoundedSlice package_slice = BoundedSlice(),
|
||||||
BoundedSlice cluster_slice = BoundedSlice(),
|
BoundedSlice cluster_slice = BoundedSlice(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue