File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,5 +45,5 @@ static void BM_Fib(benchmark::State& state) {
4545 benchmark::DoNotOptimize (result);
4646 }
4747}
48- BENCHMARK (BM_Fib)->Arg(30 );
48+ BENCHMARK (BM_Fib)->Arg(20 );
4949BENCHMARK_MAIN ();
Original file line number Diff line number Diff line change 22// using the taskflow runtime.
33
44// Adapted from cpp/taskflow/matmul.cpp
5+ // Uses 256x256 instead of larger sizes for reasonable CI runtimes
6+ // under simulation mode.
57
68#include " matmul.hpp"
79#include < taskflow/algorithm/for_each.hpp>
@@ -84,5 +86,5 @@ static void BM_Matmul(benchmark::State& state) {
8486 benchmark::ClobberMemory ();
8587 }
8688}
87- BENCHMARK (BM_Matmul)->Arg(512 );
89+ BENCHMARK (BM_Matmul)->Arg(256 );
8890BENCHMARK_MAIN ();
Original file line number Diff line number Diff line change 22// using the taskflow runtime.
33
44// Adapted from cpp/taskflow/nqueens.cpp
5+ // Uses N=10 instead of N=14 for reasonable CI runtimes
6+ // under simulation mode.
57
68#include < taskflow/taskflow.hpp>
79
1517static size_t thread_count = std::thread::hardware_concurrency();
1618std::optional<tf::Executor> executor;
1719
18- inline constexpr int nqueens_work = 14 ;
20+ inline constexpr int nqueens_work = 10 ;
1921
2022inline constexpr std::array<int , 28 > answers = {
2123 0 , 1 , 0 , 0 , 2 , 10 , 4 ,
Original file line number Diff line number Diff line change 22// using the taskflow runtime.
33
44// Adapted from cpp/taskflow/skynet.cpp
5+ // Uses depth 6 (1M tasks) instead of depth 8 (100M tasks)
6+ // for reasonable CI runtimes under simulation mode.
57
68#include < taskflow/taskflow.hpp>
79
@@ -50,7 +52,13 @@ template <size_t DepthMax>
5052void skynet (tf::Executor& exec) {
5153 size_t count;
5254 exec.async ([&]() { count = skynet_one<DepthMax>(0 , 0 ); }).get ();
53- if (count != 4999999950000000 ) {
55+ size_t expected = 0 ;
56+ size_t max_val = 1 ;
57+ for (size_t i = 0 ; i < DepthMax; ++i) {
58+ max_val *= 10 ;
59+ }
60+ expected = (max_val - 1 ) * max_val / 2 ;
61+ if (count != expected) {
5462 std::fprintf (
5563 stderr, " ERROR: wrong result - %" PRIu64 " \n " , count
5664 );
@@ -63,10 +71,10 @@ static void BM_Skynet(benchmark::State& state) {
6371 }
6472
6573 // warmup
66- skynet<8 >(*executor);
74+ skynet<6 >(*executor);
6775
6876 for (auto _ : state) {
69- skynet<8 >(*executor);
77+ skynet<6 >(*executor);
7078 }
7179}
7280BENCHMARK (BM_Skynet);
You can’t perform that action at this time.
0 commit comments