mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
Fix progress display for inactive type axis values.
When type axis values were disabled they were still counted towards a benchmark's total number of configs.
This commit is contained in:
@@ -286,6 +286,23 @@ void test_clone()
|
||||
ASSERT(clone->get_states().empty());
|
||||
}
|
||||
|
||||
void test_get_config_count()
|
||||
{
|
||||
lots_of_types_bench bench;
|
||||
bench.set_type_axes_names({"Integer", "Float", "Other"});
|
||||
bench.get_axes().get_type_axis(0).set_active_inputs({"I16", "I32"}); // 2, 2
|
||||
bench.get_axes().get_type_axis(1).set_active_inputs({"F32", "F64"}); // 2, 4
|
||||
bench.get_axes().get_type_axis(2).set_active_inputs({"bool"}); // 1, 4
|
||||
bench.add_float64_axis("foo", {0.4, 2.3, 4.3}); // 3, 12
|
||||
bench.add_int64_axis("bar", {4, 6, 15}); // 3, 36
|
||||
bench.add_string_axis("baz", {"str", "ing"}); // 2, 72
|
||||
bench.add_string_axis("baz", {"single"}); // 1, 72
|
||||
|
||||
ASSERT_MSG(bench.get_config_count() == 72,
|
||||
"Got {}",
|
||||
bench.get_config_count());
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
test_type_axes();
|
||||
@@ -296,4 +313,5 @@ int main()
|
||||
test_string_axes();
|
||||
test_run();
|
||||
test_clone();
|
||||
test_get_config_count();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user