Execute tensor L2 norm with RowFn - #9347
Conversation
Merging this PR will regress 7 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | column_x_column[256] |
105.4 µs | 136.7 µs | -22.95% |
| ❌ | Simulation | column_x_column[32] |
111.4 µs | 141.5 µs | -21.26% |
| ❌ | Simulation | search_index_above_max_chunked |
545.5 µs | 651.2 µs | -16.24% |
| ❌ | Simulation | search_index_in_range_chunked |
547 µs | 652.7 µs | -16.2% |
| ❌ | WallTime | words_gather_scalar[65536] |
8.3 µs | 9.4 µs | -11.97% |
| ❌ | Simulation | encode_non_nullable[256] |
160.5 µs | 180.6 µs | -11.11% |
| ❌ | Simulation | encode_nullable[32] |
251.7 µs | 280.3 µs | -10.22% |
| ⚡ | Simulation | non_nullable[2] |
691.1 µs | 394 µs | +75.38% |
| ⚡ | Simulation | nullable[2] |
681.1 µs | 399 µs | +70.69% |
| ⚡ | Simulation | encode_non_nullable[2] |
484.4 µs | 427.5 µs | +13.32% |
| ⚡ | Simulation | slice_dict_tight_loop[10000] |
747.2 µs | 670.7 µs | +11.4% |
| ⚡ | Simulation | compress_fsst[(500, 64, 8)] |
581.1 µs | 524.6 µs | +10.77% |
| ⚡ | Simulation | compress_fsst[(500, 64, 4)] |
516.3 µs | 467.5 µs | +10.45% |
| ⚡ | Simulation | encode_nullable[2] |
621.5 µs | 564.6 µs | +10.07% |
| 🆕 | Simulation | constant[2] |
N/A | 136.1 µs | N/A |
| 🆕 | Simulation | constant[256] |
N/A | 259.2 µs | N/A |
| 🆕 | Simulation | constant[32] |
N/A | 88.7 µs | N/A |
| 🆕 | Simulation | nullable_constant[2] |
N/A | 343 µs | N/A |
| 🆕 | Simulation | nullable_constant[256] |
N/A | 434.3 µs | N/A |
| 🆕 | Simulation | nullable_constant[32] |
N/A | 225 µs | N/A |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ct/row-fn-tensor-l2 (f220999) with ct/row-fn-primitive-comparisons (9e1c9b4)2
Footnotes
-
442 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
ct/row-fn-primitive-comparisons(8a71b98) during the generation of this report, so e6e17c3 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
28352f4 to
3557502
Compare
3557502 to
b5b830e
Compare
b5b830e to
322f5bf
Compare
322f5bf to
59cf04c
Compare
|
Here are the local L2 norm benchmark results from the final Rust 1.97.1 run. The comparison used a The machine was an AMD Ryzen 9 7950X running Linux. The build used rustc 1.97.1, LLVM 22.1.6, one CGU, fat LTO, and Negative changes are faster. The values are medians across the seven paired runs. Dense and nullable widths improve by as much as 45.91%. Width 256 remains within 2.93%. Non-null constants regress by 18.82–33.24%, while nullable constants improve by 83.36–93.90%. All L2 norm results: 12 cases
|
59cf04c to
1b0dbf3
Compare
1b0dbf3 to
ed9b38d
Compare
ed9b38d to
2c07922
Compare
2c07922 to
20d7eee
Compare
20d7eee to
0645c35
Compare
0645c35 to
68dcfff
Compare
68dcfff to
4eb3c58
Compare
4eb3c58 to
f0dc4c2
Compare
a1d4c01 to
b997cb9
Compare
b997cb9 to
3a9ff85
Compare
3a9ff85 to
a1abc6d
Compare
11ab10c to
970f830
Compare
970f830 to
e30d1d8
Compare
e30d1d8 to
a9f9568
Compare
a9f9568 to
b0bb923
Compare
b0bb923 to
c1b3934
Compare
993b67a to
691b212
Compare
691b212 to
8798a21
Compare
8798a21 to
35c9cb7
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Rationale for this change
Moves tensor L2 norm to the shared row executor while preserving the existing storage semantics.
What changes are included in this PR?
Top-level constants still reduce once, and
Normalizedarrays still return their authoritative stored norms. Masked constants use validity-aware row execution. Tests cover tensor shapes, constants, nulls, vectors, and normalized storage.Rust 1.97.1 one-CGU fat-LTO results improve dense and nullable widths by up to 46%; width 256 remains within 3%. Non-null constant inputs regress by 19–33%, while nullable constants improve by 83–94%.
What APIs are changed? Are there any user-facing changes?
There are no public API or behavior changes.
L2NormimplementsRowFnand receives the standard scalar-function vtable automatically.