Factor out check for whether to skip hot measurement to a nvbench::state private method

This commit is contained in:
Oleksandr Pavlyk
2026-02-02 12:43:39 -06:00
parent cff6df9bb2
commit 27d6492355
2 changed files with 3 additions and 1 deletions

View File

@@ -185,7 +185,7 @@ void state::exec(ExecTags tags, KernelLauncher &&kernel_launcher)
static_assert(!(tags & no_batch), "Hot measurement doesn't support the `no_batch` exec_tag.");
static_assert(!(tags & no_gpu), "Hot measurement doesn't support the `no_gpu` exec_tag.");
if (!this->get_run_once() && !this->get_skip_batched())
if (!this->skip_hot_measurement())
{
using measure_t = nvbench::detail::measure_hot<KL>;
measure_t measure{*this, kernel_launcher};

View File

@@ -306,6 +306,8 @@ private:
std::optional<nvbench::device_info> device,
std::size_t type_config_index);
bool skip_hot_measurement() { return get_run_once() || get_skip_batched(); }
std::reference_wrapper<const nvbench::benchmark_base> m_benchmark;
nvbench::named_values m_axis_values;
std::optional<nvbench::device_info> m_device;