diff --git a/examples/summaries.cu b/examples/summaries.cu index 57428c4..0bb91ae 100644 --- a/examples/summaries.cu +++ b/examples/summaries.cu @@ -26,8 +26,8 @@ void summary_example(nvbench::state &state) { // Fetch parameters and compute duration in seconds: - const auto ms = static_cast(state.get_int64("ms")); - const auto us = static_cast(state.get_int64("us")); + const auto ms = static_cast(state.get_int64("ms")); + const auto us = static_cast(state.get_int64("us")); const auto duration = ms * 1e-3 + us * 1e-6; // Add a new column to the summary table with the derived duration used by the benchmark. @@ -41,7 +41,7 @@ void summary_example(nvbench::state &state) } // Run the measurements: - state.exec([duration](nvbench::launch &launch) { + state.exec(nvbench::exec_tag::no_batch, [duration](nvbench::launch &launch) { nvbench::sleep_kernel<<<1, 1, 0, launch.get_stream()>>>(duration); }); @@ -56,14 +56,17 @@ void summary_example(nvbench::state &state) #endif // Default summary columns can be shown/hidden in the markdown output tables by adding/removing - // the "hide" key. Modify this benchmark to show the minimum and maximum times, but hide the - // means. + // the "hide" key. Modify this benchmark to show the minimum and maximum GPUs times, but hide the + // mean GPU time and all CPU times. SM Clock frequency and throttling info are also shown. state.get_summary("nv/cold/time/gpu/min").remove_value("hide"); state.get_summary("nv/cold/time/gpu/max").remove_value("hide"); state.get_summary("nv/cold/time/gpu/mean").set_string("hide", ""); - state.get_summary("nv/cold/time/cpu/min").remove_value("hide"); - state.get_summary("nv/cold/time/cpu/max").remove_value("hide"); state.get_summary("nv/cold/time/cpu/mean").set_string("hide", ""); + state.get_summary("nv/cold/time/cpu/min").set_string("hide", ""); + state.get_summary("nv/cold/time/cpu/max").set_string("hide", ""); + state.get_summary("nv/cold/time/cpu/stdev/relative").set_string("hide", ""); + state.get_summary("nv/cold/sm_clock_rate/mean").remove_value("hide"); + state.get_summary("nv/cold/sm_clock_rate/scaling/percent").remove_value("hide"); } NVBENCH_BENCH(summary_example) .add_int64_axis("ms", nvbench::range(10, 50, 20))