2626#include < nvbench/summary.cuh>
2727
2828#include < algorithm>
29- #include < limits>
3029#include < chrono>
30+ #include < limits>
3131#include < thread>
3232
3333#include < fmt/format.h>
@@ -48,7 +48,6 @@ measure_cold_base::measure_cold_base(state &exec_state)
4848 , m_timeout{exec_state.get_timeout ()}
4949 , m_throttle_threshold(exec_state.get_throttle_threshold())
5050 , m_throttle_recovery_delay(exec_state.get_throttle_recovery_delay())
51- , m_discard_on_throttle(exec_state.get_discard_on_throttle())
5251{
5352 if (m_min_samples > 0 )
5453 {
@@ -96,7 +95,6 @@ void measure_cold_base::record_measurements()
9695 if (!m_run_once)
9796 {
9897 auto peak_clock_rate = static_cast <float >(m_state.get_device ()->get_sm_default_clock_rate ());
99- m_sm_clock_rates.push_back (peak_clock_rate);
10098
10199 if (m_gpu_frequency.has_throttled (peak_clock_rate, m_throttle_threshold))
102100 {
@@ -106,14 +104,13 @@ void measure_cold_base::record_measurements()
106104 auto &printer = printer_opt_ref.value ().get ();
107105 printer.log (nvbench::log_level::warn,
108106 fmt::format (" GPU throttled below threshold ({:0.2f} MHz / {:0.2f} MHz) "
109- " ({:0.0f}% < {:0.0f}%) on sample {}. {} previous sample and "
110- " pausing for {}s." ,
107+ " ({:0.0f}% < {:0.0f}%) on sample {}. Discarding previous sample "
108+ " and pausing for {}s." ,
111109 current_clock_rate / 1000000 .0f ,
112110 peak_clock_rate / 1000000 .0f ,
113111 100 .0f * (current_clock_rate / peak_clock_rate),
114112 100 .0f * m_throttle_threshold,
115113 m_total_samples,
116- m_discard_on_throttle ? " Discarding" : " Keeping" ,
117114 m_throttle_recovery_delay));
118115 }
119116
@@ -122,11 +119,11 @@ void measure_cold_base::record_measurements()
122119 std::this_thread::sleep_for (std::chrono::duration<float >(m_throttle_recovery_delay));
123120 }
124121
125- if (m_discard_on_throttle)
126- { // ignore this measurement
127- return ;
128- }
122+ // ignore this measurement
123+ return ;
129124 }
125+
126+ m_sm_clock_rates.push_back (peak_clock_rate);
130127 }
131128
132129 // Update and record timers and counters:
@@ -348,8 +345,9 @@ void measure_cold_base::generate_summaries()
348345 summ.set_string (" hint" , " frequency" );
349346 summ.set_string (" description" , " Mean SM clock rate" );
350347 summ.set_string (" hide" , " Hidden by default." );
351- summ.set_float64 (" value" , nvbench::detail::statistics::compute_mean (m_sm_clock_rates.cbegin (),
352- m_sm_clock_rates.cend ()));
348+ summ.set_float64 (" value" ,
349+ nvbench::detail::statistics::compute_mean (m_sm_clock_rates.cbegin (),
350+ m_sm_clock_rates.cend ()));
353351 }
354352
355353 // Log if a printer exists:
0 commit comments