mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
Factor out check for whether to skip hot measurement to a nvbench::state private method
This commit is contained in:
@@ -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};
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user