Better throttle recovery delay

This commit is contained in:
Georgy Evtushenko
2025-04-13 03:53:59 +00:00
parent 5c0d674757
commit b926daf09f
5 changed files with 17 additions and 17 deletions

View File

@@ -140,13 +140,13 @@
* `--throttle-threshold <value>`
* Set the GPU throttle threshold as percentage of the peak clock rate.
* Default is 0.75 (75%).
* Default is 75%.
* Applies to the most recent `--benchmark`, or all benchmarks if specified
before any `--benchmark` arguments.
* `--throttle-recovery-delay <value>`
* Set the GPU throttle recovery delay in seconds.
* Default is 0.5 seconds.
* Default is 0.05 seconds.
* Applies to the most recent `--benchmark`, or all benchmarks if specified
before any `--benchmark` arguments.

View File

@@ -309,8 +309,8 @@ protected:
nvbench::float64_t m_skip_time{-1.};
nvbench::float64_t m_timeout{15.};
nvbench::float32_t m_throttle_threshold{0.75f}; // [% of peak SM clock rate]
nvbench::float32_t m_throttle_recovery_delay{0.0f}; // [seconds]
nvbench::float32_t m_throttle_threshold{0.75f}; // [% of peak SM clock rate]
nvbench::float32_t m_throttle_recovery_delay{0.05f}; // [seconds]
bool m_discard_on_throttle{false};
nvbench::criterion_params m_criterion_params;

View File

@@ -18,24 +18,24 @@
#pragma once
#include <cuda_runtime.h>
#include <nvbench/blocking_kernel.cuh>
#include <nvbench/cpu_timer.cuh>
#include <nvbench/cuda_call.cuh>
#include <nvbench/cuda_timer.cuh>
#include <nvbench/detail/gpu_frequency.cuh>
#include <nvbench/detail/kernel_launcher_timer_wrapper.cuh>
#include <nvbench/detail/l2flush.cuh>
#include <nvbench/detail/statistics.cuh>
#include <nvbench/device_info.cuh>
#include <nvbench/exec_tag.cuh>
#include <nvbench/launch.cuh>
#include <nvbench/stopping_criterion.cuh>
#include <nvbench/detail/kernel_launcher_timer_wrapper.cuh>
#include <nvbench/detail/l2flush.cuh>
#include <nvbench/detail/statistics.cuh>
#include <nvbench/detail/gpu_frequency.cuh>
#include <cuda_runtime.h>
#include <utility>
#include <vector>
#include "nvbench/types.cuh"
namespace nvbench
@@ -91,7 +91,7 @@ protected:
nvbench::blocking_kernel m_blocker;
nvbench::criterion_params m_criterion_params;
nvbench::stopping_criterion_base& m_stopping_criterion;
nvbench::stopping_criterion_base &m_stopping_criterion;
nvbench::detail::gpu_frequency m_gpu_frequency;
bool m_disable_blocking_kernel{false};
@@ -102,8 +102,8 @@ protected:
nvbench::float64_t m_skip_time{};
nvbench::float64_t m_timeout{};
nvbench::float32_t m_throttle_threshold{0.75f}; // [% of peak SM clock rate]
nvbench::float32_t m_throttle_recovery_delay{0.0f}; // [seconds]
nvbench::float32_t m_throttle_threshold; // [% of peak SM clock rate]
nvbench::float32_t m_throttle_recovery_delay; // [seconds]
bool m_discard_on_throttle{false};
nvbench::int64_t m_total_samples{};

View File

@@ -1071,7 +1071,7 @@ try
}
else if (prop_arg == "--throttle-threshold")
{
bench.set_throttle_threshold(static_cast<nvbench::float32_t>(value));
bench.set_throttle_threshold(static_cast<nvbench::float32_t>(value) / 100.0f);
}
else if (prop_arg == "--throttle-recovery-delay")
{

View File

@@ -338,8 +338,8 @@ private:
nvbench::float64_t m_skip_time;
nvbench::float64_t m_timeout;
nvbench::float32_t m_throttle_threshold{0.75f}; // [% of peak SM clock rate]
nvbench::float32_t m_throttle_recovery_delay{0.0f}; // [seconds]
nvbench::float32_t m_throttle_threshold; // [% of peak SM clock rate]
nvbench::float32_t m_throttle_recovery_delay; // [seconds]
bool m_discard_on_throttle{false};
// Deadlock protection. See blocking_kernel's class doc for details.