Execute tensor product functions with RowFn - #9769
Conversation
Merging this PR will regress 25 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | compress_alp[f64, (1000, 0.0, 1.0)] |
105 µs | 159 µs | -33.94% |
| ❌ | Simulation | compress_alp[f64, (1000, 0.0, 0.25)] |
114.4 µs | 168.2 µs | -32% |
| ❌ | Simulation | compress_alp[f64, (1000, 0.0, 0.95)] |
114.2 µs | 167.2 µs | -31.68% |
| ❌ | Simulation | compress_alp[f64, (1000, 0.1, 1.0)] |
150.3 µs | 211.9 µs | -29.09% |
| ❌ | Simulation | compress_alp[f64, (1000, 0.01, 1.0)] |
144.2 µs | 201.1 µs | -28.27% |
| ❌ | Simulation | alp_compress_f64 |
171.8 µs | 237.8 µs | -27.75% |
| ❌ | Simulation | compress_alp[f64, (1000, 0.01, 0.25)] |
155.1 µs | 211.9 µs | -26.78% |
| ❌ | Simulation | compress_alp[f64, (1000, 0.1, 0.25)] |
168.4 µs | 228.9 µs | -26.46% |
| ❌ | Simulation | compress_alp[f64, (1000, 0.1, 0.95)] |
177.5 µs | 237.3 µs | -25.21% |
| ❌ | Simulation | compress_alp[f64, (1000, 0.01, 0.95)] |
159.6 µs | 213.2 µs | -25.13% |
| ❌ | Simulation | compress_alp[f32, (1000, 0.0, 1.0)] |
51.9 µs | 63.4 µs | -18.08% |
| ❌ | Simulation | compress_alp[f32, (1000, 0.0, 0.95)] |
61.1 µs | 73.1 µs | -16.47% |
| ❌ | Simulation | compress_alp[f32, (1000, 0.0, 0.25)] |
61.2 µs | 73.3 µs | -16.47% |
| ❌ | Simulation | compress_alp[f64, (10000, 0.0, 1.0)] |
308.2 µs | 361 µs | -14.64% |
| ❌ | Simulation | compress_alp[f64, (10000, 0.0, 0.95)] |
318.3 µs | 370.9 µs | -14.19% |
| ❌ | Simulation | compress_alp[f64, (10000, 0.0, 0.25)] |
318.2 µs | 370.7 µs | -14.16% |
| ❌ | Simulation | compress_alp[f64, (10000, 0.01, 1.0)] |
538.8 µs | 616.2 µs | -12.57% |
| ❌ | Simulation | compress_alp[f32, (1000, 0.1, 1.0)] |
96.1 µs | 109.5 µs | -12.19% |
| ❌ | Simulation | compress_alp[f32, (1000, 0.01, 1.0)] |
90.6 µs | 103.1 µs | -12.08% |
| ❌ | Simulation | compress_alp[f64, (10000, 0.1, 1.0)] |
574 µs | 652.6 µs | -12.05% |
| ... | ... | ... | ... | ... | ... |
ℹ️ 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-products-v2 (b37f665) with ct/row-fn-tensor-l2-v2 (5974184)2
Footnotes
-
218 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-tensor-l2-v2(929ae6d) during the generation of this report, so da9d39c was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
f280e27 to
9a47353
Compare
9a47353 to
fa4e555
Compare
6e3be68 to
288aec3
Compare
288aec3 to
4f0fa1a
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
4f0fa1a to
b37f665
Compare
Summary
Moves inner product and cosine similarity to RowFn without changing their arithmetic contracts.
Changes
Inner product keeps the existing left-to-right multiply-and-sum order. Cosine computes that dot product followed by both L2 norms and the existing zero-denominator guard, with no encoded reduction, reassociation, or constant-norm shortcut. Tests cover nulls, empty and zero-width rows, IEEE overflow and underflow, and bitwise agreement between constant encodings and materialized rows.