Update benchmark macros:

s/NVBENCH_CREATE/NVBENCH_BENCH/g
s/NVBENCH_BENCH_TEMPLATE/NVBENCH_BENCH_TYPES/g

This will fit nicer once the exec_tags version are added:

NVBENCH_BENCH
NVBENCH_BENCH_TYPES
NVBENCH_BENCH_FLAGS
NVBENCH_BENCH_TYPES_FLAGS
This commit is contained in:
Allison Vacanti
2021-02-16 16:08:07 -05:00
parent d12326083d
commit 37e753f7b6
5 changed files with 12 additions and 12 deletions

View File

@@ -40,9 +40,9 @@ void no_op_generator(nvbench::state &state)
// Marking as skipped to signal that this state is run:
state.skip(fmt::to_string(std::move(params)));
}
NVBENCH_CREATE(no_op_generator); // default name
NVBENCH_CREATE(no_op_generator).set_name("Custom Name");
NVBENCH_CREATE(no_op_generator)
NVBENCH_BENCH(no_op_generator); // default name
NVBENCH_BENCH(no_op_generator).set_name("Custom Name");
NVBENCH_BENCH(no_op_generator)
.set_name("No Types")
.add_int64_axis("Int", {1, 2, 3})
.add_float64_axis("Float", {11.0, 12.0, 13.0})
@@ -67,13 +67,13 @@ void template_no_op_generator(nvbench::state &state,
// Enum params using non-templated version:
no_op_generator(state);
}
NVBENCH_CREATE_TEMPLATE(template_no_op_generator, type_axes)
NVBENCH_BENCH_TYPES(template_no_op_generator, type_axes)
.set_name("All The Axes")
.set_type_axes_names({"FloatT", "IntT", "MiscT"})
.add_int64_axis("Int", {1, 2, 3})
.add_float64_axis("Float", {11.0, 12.0, 13.0})
.add_string_axis("String", {"One", "Two", "Three"});
NVBENCH_CREATE_TEMPLATE(template_no_op_generator, type_axes)
NVBENCH_BENCH_TYPES(template_no_op_generator, type_axes)
.set_name("Oops, All Types!")
.set_type_axes_names({"FloatT", "IntT", "MiscT"});
@@ -177,7 +177,7 @@ Params: FloatT: F64 IntT: I64 MiscT: void
void validate_all_axes()
{
auto bench =
auto bench =
nvbench::benchmark_manager::get().get_benchmark("All The Axes").clone();
const std::string ref =

View File

@@ -10,7 +10,7 @@
//==============================================================================
// Declare a couple benchmarks for testing:
void DummyBench(nvbench::state &state) { state.skip("Skipping for testing."); }
NVBENCH_CREATE(DummyBench).clear_devices();
NVBENCH_BENCH(DummyBench).clear_devices();
using Ts = nvbench::type_list<void, nvbench::int8_t, nvbench::uint8_t>;
using Us = nvbench::type_list<bool, nvbench::float32_t, nvbench::float64_t>;
@@ -20,7 +20,7 @@ void TestBench(nvbench::state &state, nvbench::type_list<T, U>)
{
DummyBench(state);
}
NVBENCH_CREATE_TEMPLATE(TestBench, NVBENCH_TYPE_AXES(Ts, Us))
NVBENCH_BENCH_TYPES(TestBench, NVBENCH_TYPE_AXES(Ts, Us))
.set_type_axes_names({"T", "U"})
.add_int64_axis("Ints", {42})
.add_int64_power_of_two_axis("PO2s", {3})