File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,10 @@ class State:
169169 "Get Benchmark this configuration is a part of"
170170 ...
171171 def get_throttle_threshold (self ) -> float :
172- "Get throttle threshold value"
172+ "Get throttle threshold value, as fraction of maximal frequency"
173+ ...
174+ def set_throttle_threshold (self , threshold_fraction : float ) -> None :
175+ "Set throttle threshold fraction to specified value, expected to be between 0 and 1"
173176 ...
174177 def get_min_samples (self ) -> int :
175178 "Get the number of benchmark timings NVBench performs before stopping criterion begins being used"
Original file line number Diff line number Diff line change @@ -481,6 +481,9 @@ PYBIND11_MODULE(_nvbench, m)
481481 [](const nvbench::state &state) { return std::ref (state.get_benchmark ()); },
482482 py::return_value_policy::reference);
483483 pystate_cls.def (" get_throttle_threshold" , &nvbench::state::get_throttle_threshold);
484+ pystate_cls.def (" set_throttle_threshold" ,
485+ &nvbench::state::set_throttle_threshold,
486+ py::arg (" throttle_fraction" ));
484487
485488 pystate_cls.def (" get_min_samples" , &nvbench::state::get_min_samples);
486489 pystate_cls.def (" set_min_samples" ,
You can’t perform that action at this time.
0 commit comments