Commit 17bd9e2
authored
Measure numeric arithmetic and comparison benchmarks per CPU feature (#9599)
## Summary
Sweeps `#[cpu_features]` across the microbenchmarks that clearly earn
it: the binary numeric arithmetic and comparison kernels. Those are
portable lane loops — the source is identical on every target and the
vector width the compiler picks comes from the build flags — which is
the case the attribute exists for. Measuring them in simulation under
one fixed `+avx2` build hides the only variable that matters.
Middle of a three-PR stack: #9598, then this PR, then #9587. It carries
no kernel changes of its own — everything here is a benchmark attribute
— so it can be reordered or rebased onto `develop` without touching the
other two.
## Changes
Tagged:
- `binary_ops`: the primitive arithmetic cases (`add_*`, `subtract_*`,
`multiply_*`, `mul_*`, `div_i64_*`, `sub_i64_constant`, and the three
`*_shapes` matrices) and the two primitive comparison cases
(`eq_i64_constant`, `lt_i64_nullable`).
- `compare`: `compare_int`, `compare_int_nullable`,
`compare_int_constant`, `compare_int_eq`, `compare_float`.
- `scalar_subtract`.
- `lane_kernels`: `lanezip_checked_add_u32` and its
`arrow_checked_add_u32` baseline. The baseline is tagged too — comparing
the two is only meaningful under the same build flags.
Left in simulation, with the reasoning recorded in each file's module
docs:
- Decimal arithmetic and comparison: `i128` widening and per-lane
rescaling, not something a wider vector register decides.
- Boolean `and`/`or`: already word-at-a-time over a bitmap.
- String and struct comparison: dominated by view chasing and per-field
dispatch.
- Casts in `lane_kernels`: vectorization-sensitive, but out of scope
here.
Also left alone: the `between` benchmarks in `vortex-fastlanes`
(`new_raw_prim_test_between` is a raw-primitive comparison kernel and
does qualify) and the bit-packed comparison matrices. Both are `types
=`/`consts =` parameterized, which `#[cpu_features]` has no coverage for
yet, and both would fan out to dozens of walltime series. Worth a
follow-up rather than a guess in this PR.
Note that tagging moves a benchmark out of the sharded simulation job,
so these series restart on the walltime legs instead of continuing their
simulation history.
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>1 parent 0ef496c commit 17bd9e2
6 files changed
Lines changed: 60 additions & 6 deletions
File tree
- vortex-array/benches
- vortex-compute
- benches
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 | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
4 | 15 | | |
5 | 16 | | |
6 | 17 | | |
| |||
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
| 87 | + | |
76 | 88 | | |
77 | 89 | | |
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
| 93 | + | |
81 | 94 | | |
82 | 95 | | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| 99 | + | |
86 | 100 | | |
87 | 101 | | |
88 | 102 | | |
| |||
104 | 118 | | |
105 | 119 | | |
106 | 120 | | |
| 121 | + | |
107 | 122 | | |
108 | 123 | | |
109 | 124 | | |
| |||
112 | 127 | | |
113 | 128 | | |
114 | 129 | | |
| 130 | + | |
115 | 131 | | |
116 | 132 | | |
117 | 133 | | |
| |||
120 | 136 | | |
121 | 137 | | |
122 | 138 | | |
| 139 | + | |
123 | 140 | | |
124 | 141 | | |
125 | 142 | | |
| |||
128 | 145 | | |
129 | 146 | | |
130 | 147 | | |
| 148 | + | |
131 | 149 | | |
132 | 150 | | |
133 | 151 | | |
| |||
136 | 154 | | |
137 | 155 | | |
138 | 156 | | |
| 157 | + | |
139 | 158 | | |
140 | 159 | | |
141 | 160 | | |
| |||
144 | 163 | | |
145 | 164 | | |
146 | 165 | | |
| 166 | + | |
147 | 167 | | |
148 | 168 | | |
149 | 169 | | |
| |||
152 | 172 | | |
153 | 173 | | |
154 | 174 | | |
| 175 | + | |
155 | 176 | | |
156 | 177 | | |
157 | 178 | | |
| |||
160 | 181 | | |
161 | 182 | | |
162 | 183 | | |
| 184 | + | |
163 | 185 | | |
164 | 186 | | |
165 | 187 | | |
| |||
168 | 190 | | |
169 | 191 | | |
170 | 192 | | |
| 193 | + | |
171 | 194 | | |
172 | 195 | | |
173 | 196 | | |
| |||
176 | 199 | | |
177 | 200 | | |
178 | 201 | | |
| 202 | + | |
179 | 203 | | |
180 | 204 | | |
181 | 205 | | |
| |||
184 | 208 | | |
185 | 209 | | |
186 | 210 | | |
| 211 | + | |
187 | 212 | | |
188 | 213 | | |
189 | 214 | | |
| |||
192 | 217 | | |
193 | 218 | | |
194 | 219 | | |
| 220 | + | |
195 | 221 | | |
196 | 222 | | |
197 | 223 | | |
| |||
200 | 226 | | |
201 | 227 | | |
202 | 228 | | |
| 229 | + | |
203 | 230 | | |
204 | 231 | | |
205 | 232 | | |
| |||
208 | 235 | | |
209 | 236 | | |
210 | 237 | | |
| 238 | + | |
211 | 239 | | |
212 | 240 | | |
213 | 241 | | |
| |||
216 | 244 | | |
217 | 245 | | |
218 | 246 | | |
| 247 | + | |
219 | 248 | | |
220 | 249 | | |
221 | 250 | | |
| |||
224 | 253 | | |
225 | 254 | | |
226 | 255 | | |
| 256 | + | |
227 | 257 | | |
228 | 258 | | |
229 | 259 | | |
| |||
232 | 262 | | |
233 | 263 | | |
234 | 264 | | |
| 265 | + | |
235 | 266 | | |
236 | 267 | | |
237 | 268 | | |
| |||
240 | 271 | | |
241 | 272 | | |
242 | 273 | | |
| 274 | + | |
243 | 275 | | |
244 | 276 | | |
245 | 277 | | |
| |||
296 | 328 | | |
297 | 329 | | |
298 | 330 | | |
| 331 | + | |
299 | 332 | | |
300 | 333 | | |
301 | 334 | | |
| |||
304 | 337 | | |
305 | 338 | | |
306 | 339 | | |
| 340 | + | |
307 | 341 | | |
308 | 342 | | |
309 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| |||
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
| 172 | + | |
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
| |||
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
| 181 | + | |
175 | 182 | | |
176 | 183 | | |
177 | 184 | | |
| |||
180 | 187 | | |
181 | 188 | | |
182 | 189 | | |
| 190 | + | |
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
| |||
224 | 232 | | |
225 | 233 | | |
226 | 234 | | |
| 235 | + | |
227 | 236 | | |
228 | 237 | | |
229 | 238 | | |
| |||
232 | 241 | | |
233 | 242 | | |
234 | 243 | | |
| 244 | + | |
235 | 245 | | |
236 | 246 | | |
237 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
324 | 329 | | |
325 | 330 | | |
326 | 331 | | |
| 332 | + | |
327 | 333 | | |
328 | 334 | | |
329 | 335 | | |
| |||
346 | 352 | | |
347 | 353 | | |
348 | 354 | | |
| 355 | + | |
349 | 356 | | |
350 | 357 | | |
351 | 358 | | |
| |||
0 commit comments