Skip to content

Commit b926daf

Browse files
committed
Better throttle recovery delay
1 parent 5c0d674 commit b926daf

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

docs/cli_help.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@
140140

141141
* `--throttle-threshold <value>`
142142
* Set the GPU throttle threshold as percentage of the peak clock rate.
143-
* Default is 0.75 (75%).
143+
* Default is 75%.
144144
* Applies to the most recent `--benchmark`, or all benchmarks if specified
145145
before any `--benchmark` arguments.
146146

147147
* `--throttle-recovery-delay <value>`
148148
* Set the GPU throttle recovery delay in seconds.
149-
* Default is 0.5 seconds.
149+
* Default is 0.05 seconds.
150150
* Applies to the most recent `--benchmark`, or all benchmarks if specified
151151
before any `--benchmark` arguments.
152152

nvbench/benchmark_base.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ protected:
309309
nvbench::float64_t m_skip_time{-1.};
310310
nvbench::float64_t m_timeout{15.};
311311

312-
nvbench::float32_t m_throttle_threshold{0.75f}; // [% of peak SM clock rate]
313-
nvbench::float32_t m_throttle_recovery_delay{0.0f}; // [seconds]
312+
nvbench::float32_t m_throttle_threshold{0.75f}; // [% of peak SM clock rate]
313+
nvbench::float32_t m_throttle_recovery_delay{0.05f}; // [seconds]
314314
bool m_discard_on_throttle{false};
315315

316316
nvbench::criterion_params m_criterion_params;

nvbench/detail/measure_cold.cuh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@
1818

1919
#pragma once
2020

21+
#include <cuda_runtime.h>
22+
2123
#include <nvbench/blocking_kernel.cuh>
2224
#include <nvbench/cpu_timer.cuh>
2325
#include <nvbench/cuda_call.cuh>
2426
#include <nvbench/cuda_timer.cuh>
27+
#include <nvbench/detail/gpu_frequency.cuh>
28+
#include <nvbench/detail/kernel_launcher_timer_wrapper.cuh>
29+
#include <nvbench/detail/l2flush.cuh>
30+
#include <nvbench/detail/statistics.cuh>
2531
#include <nvbench/device_info.cuh>
2632
#include <nvbench/exec_tag.cuh>
2733
#include <nvbench/launch.cuh>
2834
#include <nvbench/stopping_criterion.cuh>
2935

30-
#include <nvbench/detail/kernel_launcher_timer_wrapper.cuh>
31-
#include <nvbench/detail/l2flush.cuh>
32-
#include <nvbench/detail/statistics.cuh>
33-
#include <nvbench/detail/gpu_frequency.cuh>
34-
35-
#include <cuda_runtime.h>
36-
3736
#include <utility>
3837
#include <vector>
38+
3939
#include "nvbench/types.cuh"
4040

4141
namespace nvbench
@@ -91,7 +91,7 @@ protected:
9191
nvbench::blocking_kernel m_blocker;
9292

9393
nvbench::criterion_params m_criterion_params;
94-
nvbench::stopping_criterion_base& m_stopping_criterion;
94+
nvbench::stopping_criterion_base &m_stopping_criterion;
9595
nvbench::detail::gpu_frequency m_gpu_frequency;
9696

9797
bool m_disable_blocking_kernel{false};
@@ -102,8 +102,8 @@ protected:
102102
nvbench::float64_t m_skip_time{};
103103
nvbench::float64_t m_timeout{};
104104

105-
nvbench::float32_t m_throttle_threshold{0.75f}; // [% of peak SM clock rate]
106-
nvbench::float32_t m_throttle_recovery_delay{0.0f}; // [seconds]
105+
nvbench::float32_t m_throttle_threshold; // [% of peak SM clock rate]
106+
nvbench::float32_t m_throttle_recovery_delay; // [seconds]
107107
bool m_discard_on_throttle{false};
108108

109109
nvbench::int64_t m_total_samples{};

nvbench/option_parser.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ try
10711071
}
10721072
else if (prop_arg == "--throttle-threshold")
10731073
{
1074-
bench.set_throttle_threshold(static_cast<nvbench::float32_t>(value));
1074+
bench.set_throttle_threshold(static_cast<nvbench::float32_t>(value) / 100.0f);
10751075
}
10761076
else if (prop_arg == "--throttle-recovery-delay")
10771077
{

nvbench/state.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ private:
338338
nvbench::float64_t m_skip_time;
339339
nvbench::float64_t m_timeout;
340340

341-
nvbench::float32_t m_throttle_threshold{0.75f}; // [% of peak SM clock rate]
342-
nvbench::float32_t m_throttle_recovery_delay{0.0f}; // [seconds]
341+
nvbench::float32_t m_throttle_threshold; // [% of peak SM clock rate]
342+
nvbench::float32_t m_throttle_recovery_delay; // [seconds]
343343
bool m_discard_on_throttle{false};
344344

345345
// Deadlock protection. See blocking_kernel's class doc for details.

0 commit comments

Comments
 (0)