Skip to content

Commit 5b000e8

Browse files
committed
More cleanup
1 parent 26467f3 commit 5b000e8

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

docs/benchmarks.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ Keep the rapid growth of combinations due to multiple parameter axes in mind whe
243243
choosing the number of values in an axis. See the section about combinatorial
244244
explosion for more examples and information.
245245

246-
## Zipped/Tied Iteration of Value Axes
246+
## Zipped Iteration of Value Axes
247247

248248
At times multiple value axes need to be iterated like they are actually a tuple
249249
or zipped together. To enable this behavior you can request axes to be 'zipped'
@@ -252,8 +252,8 @@ together.
252252
```cpp
253253
// InputTypes: {char, int, unsigned int}
254254
// OutputTypes: {float, double}
255-
// NumInputs: {2^10, 2^20, 2^30}
256-
// Quality: {0.5, 1.0}
255+
// NumInputs: {1000, 10000, 100000, 200000, 200000, 200000}
256+
// Quality: {0.05, 0.1, 0.25, 0.5, 0.75, 1.}
257257

258258
using input_types = nvbench::type_list<char, int, unsigned int>;
259259
using output_types = nvbench::type_list<float, double>;
@@ -267,6 +267,8 @@ NVBENCH_BENCH_TYPES(benchmark, NVBENCH_TYPE_AXES(input_types, output_types))
267267
Zipping these two axes reduces the total combinations from 216 to 36, reducing the
268268
combinatorial explosion.
269269
270+
Note: Only value axes may be zipped together.
271+
270272
# Throughput Measurements
271273
272274
In additional to raw timing information, NVBench can track a kernel's

examples/custom_iteration_spaces.cu

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,29 +60,21 @@ void copy_sweep_grid_shape(nvbench::state &state)
6060
num_values);
6161
});
6262
}
63-
void naive_copy_sweep_grid_shape(nvbench::state &state)
64-
{
65-
copy_sweep_grid_shape(state);
66-
}
67-
void tied_copy_sweep_grid_shape(nvbench::state &state)
68-
{
69-
copy_sweep_grid_shape(state);
70-
}
7163

7264
//==============================================================================
7365
// Naive iteration of both the BlockSize and NumBlocks axes.
7466
// Will generate the full cartesian product of the two axes for a total of
7567
// 16 invocations of copy_sweep_grid_shape.
76-
NVBENCH_BENCH(naive_copy_sweep_grid_shape)
77-
// Full combinatorial of Every power of two from 64->1024:
68+
NVBENCH_BENCH(copy_sweep_grid_shape)
69+
.set_name("naive_copy_sweep_grid_shape")
7870
.add_int64_axis("BlockSize", {32, 64, 128, 256})
7971
.add_int64_axis("NumBlocks", {1024, 512, 256, 128});
8072

8173
//==============================================================================
8274
// Zipped iteration of BlockSize and NumBlocks axes.
8375
// Will generate only 4 invocations of copy_sweep_grid_shape
84-
NVBENCH_BENCH(tied_copy_sweep_grid_shape)
85-
// Every power of two from 64->1024:
76+
NVBENCH_BENCH(copy_sweep_grid_shape)
77+
.set_name("tied_copy_sweep_grid_shape")
8678
.add_zip_axes(nvbench::int64_axis{"BlockSize", {32, 64, 128, 256}},
8779
nvbench::int64_axis{"NumBlocks", {1024, 512, 256, 128}});
8880

@@ -160,11 +152,8 @@ struct under_diag final : nvbench::user_axis_space
160152
}
161153
};
162154

163-
void user_copy_sweep_grid_shape(nvbench::state &state)
164-
{
165-
copy_sweep_grid_shape(state);
166-
}
167-
NVBENCH_BENCH(user_copy_sweep_grid_shape)
155+
NVBENCH_BENCH(copy_sweep_grid_shape)
156+
.set_name("user_copy_sweep_grid_shape")
168157
.add_user_iteration_axes(
169158
[](auto... args) -> std::unique_ptr<nvbench::axis_space_base> {
170159
return std::make_unique<under_diag>(args...);

0 commit comments

Comments
 (0)