Refactor summary API and update nvbench/summary.cuh docs.

The string used when constructing a summary is no longer a human
readable name, but rather a tag string (e.g. "nv/cold/time/gpu/mean").
These will make lookup easier and more stable going forward.

name vs. short_name no longer exists. Now there is just "name", which
is used for column headings. The "description" string may still be
used for detailed information.

Updated the json tests and compare script to reflect these changes.
This commit is contained in:
Allison Vacanti
2021-12-22 13:54:49 -05:00
parent 9481e947aa
commit 6dee1eec3b
12 changed files with 182 additions and 148 deletions

View File

@@ -48,12 +48,12 @@ void noisy_bench(nvbench::state &state)
});
const auto measured_mean = static_cast<nvbench::float32_t>(
state.get_summary("Average GPU Time (Cold)").get_float64("value"));
state.get_summary("nv/cold/time/gpu/mean").get_float64("value"));
const auto measured_noise = [&]() {
try
{
return static_cast<nvbench::float32_t>(
state.get_summary("GPU Relative Standard Deviation (Cold)")
state.get_summary("nv/cold/time/gpu/stdev/relative")
.get_float64("value"));
}
catch (std::invalid_argument &)