Execute tensor L2 norm with RowFn - #9347
Conversation
Merging this PR will regress 4 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | column_x_column[256] |
143.7 µs | 179.9 µs | -20.11% |
| ❌ | Simulation | cold_misaligned[(64, 256)] |
4.4 ms | 5.3 ms | -17.14% |
| ❌ | Simulation | column_x_column[32] |
159.1 µs | 191.5 µs | -16.92% |
| ❌ | Simulation | encode_varbinview[(10000, 2)] |
2.1 ms | 2.3 ms | -10.96% |
| ⚡ | Simulation | compare_u8_constant |
890.3 µs | 282 µs | ×3.2 |
| ⚡ | Simulation | compare_i32_constant |
1,184.1 µs | 516.3 µs | ×2.3 |
| ⚡ | Simulation | case_when_nary_10_conditions[10000] |
1,987.7 µs | 998.8 µs | +99.01% |
| ⚡ | Simulation | case_when_all_false[100000] |
2.1 ms | 1.1 ms | +90.3% |
| ⚡ | Simulation | case_when_all_true[100000] |
2.1 ms | 1.1 ms | +89.84% |
| ⚡ | Simulation | case_when_simple[100000] |
2.3 ms | 1.3 ms | +80.39% |
| ⚡ | Simulation | case_when_nary_equality_lookup[10000] |
1,147.7 µs | 644.8 µs | +78% |
| ⚡ | Simulation | case_when_without_else[100000] |
2.4 ms | 1.3 ms | +75.7% |
| ⚡ | Simulation | case_when_nary_3_conditions[10000] |
766.6 µs | 462.9 µs | +65.59% |
| ⚡ | Simulation | case_when_nary_early_dominant[10000] |
763.7 µs | 463.1 µs | +64.91% |
| ⚡ | Simulation | non_nullable[2] |
691 µs | 473.8 µs | +45.84% |
| ⚡ | Simulation | nullable[2] |
682.2 µs | 478 µs | +42.74% |
| ⚡ | Simulation | case_when_all_false[10000] |
343.5 µs | 242.7 µs | +41.54% |
| ⚡ | Simulation | case_when_all_true[10000] |
346.9 µs | 247.4 µs | +40.24% |
| ⚡ | Simulation | case_when_simple[10000] |
373 µs | 272.1 µs | +37.07% |
| ⚡ | Simulation | case_when_without_else[10000] |
391.6 µs | 291.6 µs | +34.3% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
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 (6c84e6e) with ct/row-fn-primitive-comparisons (8c215b8)
Footnotes
-
89 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. ↩
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
f0dc4c2 to
d5d1dc7
Compare
15ca838 to
3d25f2a
Compare
0ba300a to
cfd5741
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
cfd5741 to
6c84e6e
Compare
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.