Skip to content

Commit 27d6492

Browse files
Factor out check for whether to skip hot measurement to a nvbench::state private method
1 parent cff6df9 commit 27d6492

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

nvbench/detail/state_exec.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ void state::exec(ExecTags tags, KernelLauncher &&kernel_launcher)
185185
static_assert(!(tags & no_batch), "Hot measurement doesn't support the `no_batch` exec_tag.");
186186
static_assert(!(tags & no_gpu), "Hot measurement doesn't support the `no_gpu` exec_tag.");
187187

188-
if (!this->get_run_once() && !this->get_skip_batched())
188+
if (!this->skip_hot_measurement())
189189
{
190190
using measure_t = nvbench::detail::measure_hot<KL>;
191191
measure_t measure{*this, kernel_launcher};

nvbench/state.cuh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ private:
306306
std::optional<nvbench::device_info> device,
307307
std::size_t type_config_index);
308308

309+
bool skip_hot_measurement() { return get_run_once() || get_skip_batched(); }
310+
309311
std::reference_wrapper<const nvbench::benchmark_base> m_benchmark;
310312
nvbench::named_values m_axis_values;
311313
std::optional<nvbench::device_info> m_device;

0 commit comments

Comments
 (0)