Formatting updates.

This commit is contained in:
Allison Piper
2025-04-14 17:26:12 +00:00
parent de36f1a248
commit 3440855dbd
107 changed files with 808 additions and 967 deletions

View File

@@ -16,17 +16,14 @@
* limitations under the License.
*/
#include <nvbench/create.cuh>
#include <nvbench/benchmark.cuh>
#include <nvbench/callable.cuh>
#include <nvbench/create.cuh>
#include <nvbench/state.cuh>
#include <nvbench/type_list.cuh>
#include <nvbench/type_strings.cuh>
#include <nvbench/types.cuh>
#include "test_asserts.cuh"
#include <fmt/format.h>
#include <algorithm>
@@ -34,6 +31,8 @@
#include <variant>
#include <vector>
#include "test_asserts.cuh"
template <typename T>
std::vector<T> sort(std::vector<T> &&vec)
{
@@ -72,15 +71,11 @@ using misc_types = nvbench::type_list<bool, void>;
using type_axes = nvbench::type_list<float_types, int_types, misc_types>;
template <typename FloatT, typename IntT, typename MiscT>
void template_no_op_generator(nvbench::state &state,
nvbench::type_list<FloatT, IntT, MiscT>)
void template_no_op_generator(nvbench::state &state, nvbench::type_list<FloatT, IntT, MiscT>)
{
ASSERT(nvbench::type_strings<FloatT>::input_string() ==
state.get_string("FloatT"));
ASSERT(nvbench::type_strings<IntT>::input_string() ==
state.get_string("IntT"));
ASSERT(nvbench::type_strings<IntT>::input_string() ==
state.get_string("IntT"));
ASSERT(nvbench::type_strings<FloatT>::input_string() == state.get_string("FloatT"));
ASSERT(nvbench::type_strings<IntT>::input_string() == state.get_string("IntT"));
ASSERT(nvbench::type_strings<IntT>::input_string() == state.get_string("IntT"));
// Enum params using non-templated version:
no_op_generator(state);
@@ -116,8 +111,7 @@ std::string run_and_get_state_string(nvbench::benchmark_base &bench,
void validate_default_name()
{
auto bench =
nvbench::benchmark_manager::get().get_benchmark("no_op_generator").clone();
auto bench = nvbench::benchmark_manager::get().get_benchmark("no_op_generator").clone();
const std::string ref = "Params:\n";
@@ -127,8 +121,7 @@ void validate_default_name()
void validate_custom_name()
{
auto bench =
nvbench::benchmark_manager::get().get_benchmark("Custom Name").clone();
auto bench = nvbench::benchmark_manager::get().get_benchmark("Custom Name").clone();
const std::string ref = "Params:\n";
@@ -138,8 +131,7 @@ void validate_custom_name()
void validate_no_types()
{
auto bench =
nvbench::benchmark_manager::get().get_benchmark("No Types").clone();
auto bench = nvbench::benchmark_manager::get().get_benchmark("No Types").clone();
const std::string ref = R"expected(Params: Float: 11 Int: 1 String: One
Params: Float: 11 Int: 2 String: One
@@ -176,8 +168,7 @@ Params: Float: 13 Int: 3 String: Three
void validate_only_types()
{
auto bench =
nvbench::benchmark_manager::get().get_benchmark("Oops, All Types!").clone();
auto bench = nvbench::benchmark_manager::get().get_benchmark("Oops, All Types!").clone();
const std::string ref = R"expected(Params: FloatT: F32 IntT: I32 MiscT: bool
Params: FloatT: F32 IntT: I32 MiscT: void
@@ -195,8 +186,7 @@ Params: FloatT: F64 IntT: I64 MiscT: void
void validate_all_axes()
{
auto bench =
nvbench::benchmark_manager::get().get_benchmark("All The Axes").clone();
auto bench = nvbench::benchmark_manager::get().get_benchmark("All The Axes").clone();
const std::string ref =
R"expected(Params: Float: 11 FloatT: F32 Int: 1 IntT: I32 MiscT: bool String: One