Commit 0ef496c
authored
Benchmark primitive comparison across CPU features (#9598)
## Summary
The measurement half of #9587, split out so the numbers land before the
kernels do.
Bottom of a three-PR stack: this PR, then #9599, then #9587. Tagging
these with `#[cpu_features]` first means the walltime legs record the
portable lane kernel's throughput on `avx2`, `avx512`, and `neon` metal
as a baseline series. The kernel PR then reports against it rather than
introducing both the benchmark and the thing it measures in one diff.
## Changes
- Adds the primitive comparison cases a hand-written SIMD kernel would
have to beat: constant on the left, `u8`, `u64`, and `f32`.
- Tags those four with `#[cpu_features]`, so each walltime leg measures
them under its own build flags instead of in simulation. The existing
cases are untouched and keep their simulation series.
- `bench_compare` now carries an `ItemsCount`, so the report reads as
throughput rather than a time that only means something next to another
run over the same array length.
- Adds module docs recording why these four are tagged and the rest are
not.
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>1 parent e4b3421 commit 0ef496c
3 files changed
Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
4 | 13 | | |
5 | 14 | | |
6 | 15 | | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| |||
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
| 51 | + | |
| 52 | + | |
41 | 53 | | |
| 54 | + | |
42 | 55 | | |
43 | 56 | | |
44 | 57 | | |
| |||
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
91 | 125 | | |
92 | 126 | | |
93 | 127 | | |
| |||
154 | 188 | | |
155 | 189 | | |
156 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
157 | 227 | | |
158 | 228 | | |
159 | 229 | | |
| |||
0 commit comments