Skip to content

Commit

Permalink
Use non-mangled type names in nvbench output (#16649)
Browse files Browse the repository at this point in the history
Uses the `NVBENCH_DECLARE_TYPE_STRINGS` feature to produce readable type names in the nvbench output.
Example previous output for `cudf::timestamp_ms` would appear like this:
```
| cuda::std::__4::chrono::time_point<cuda::std::__4::chrono::system_clock, cuda::std::__4::chrono::duration<long, cuda::std::__4::ratio<1l, 1000l> > > | 100000 |  23840x | 25.138 us | 21.98% | 20.979 us |  9.54% | 4.767G |  38.134 GB/s |  4.38% |
```
Adding the nvbench name feature changes this to:
```
| cudf::timestamp_ms | 100000 |  24752x | 24.387 us | 21.58% | 20.208 us | 3.79% | 4.948G |  39.588 GB/s |  4.55% |
```

Authors:
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Mark Harris (https://github.com/harrism)

URL: #16649
  • Loading branch information
davidwendt committed Aug 27, 2024
1 parent f511322 commit c4591c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/benchmarks/reduction/minmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ static void reduction_minmax(nvbench::state& state, nvbench::type_list<DataType>
set_throughputs(state);
}

NVBENCH_DECLARE_TYPE_STRINGS(cudf::timestamp_ms, "cudf::timestamp_ms", "cudf::timestamp_ms");

using Types = nvbench::type_list<bool, int8_t, int32_t, float, cudf::timestamp_ms>;

NVBENCH_BENCH_TYPES(reduction_minmax, NVBENCH_TYPE_AXES(Types))
Expand Down
2 changes: 2 additions & 0 deletions cpp/benchmarks/reduction/reduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ static void reduction(nvbench::state& state, nvbench::type_list<DataType, nvbenc
set_throughputs(state);
}

NVBENCH_DECLARE_TYPE_STRINGS(cudf::timestamp_ms, "cudf::timestamp_ms", "cudf::timestamp_ms");

using Types = nvbench::type_list<int32_t, int64_t, double, cudf::timestamp_ms>;
using AggKinds = nvbench::enum_type_list<cudf::reduce_aggregation::MIN,
cudf::reduce_aggregation::SUM,
Expand Down

0 comments on commit c4591c0

Please sign in to comment.