Skip to content

Execute tensor product functions with RowFn - #9769

Draft
connortsui20 wants to merge 1 commit into
ct/row-fn-tensor-l2-v2from
ct/row-fn-tensor-products-v2
Draft

Execute tensor product functions with RowFn#9769
connortsui20 wants to merge 1 commit into
ct/row-fn-tensor-l2-v2from
ct/row-fn-tensor-products-v2

Conversation

@connortsui20

@connortsui20 connortsui20 commented Sep 4, 2026

Copy link
Copy Markdown
Member

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.

@connortsui20 connortsui20 added the changelog/skip Do not list PR in the changelog label Sep 4, 2026
@codspeed-hq

codspeed-hq Bot commented Sep 4, 2026

Copy link
Copy Markdown

Merging this PR will regress 5 benchmarks

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 25 improved benchmarks
❌ 5 regressed benchmarks
✅ 2157 untouched benchmarks
🆕 10 new benchmarks
⏩ 218 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime mul_u64_nonnull_neon 15.4 µs 20.5 µs -24.89%
Simulation decompress[u64, (4000, 1024)] 70.5 µs 86 µs -18.03%
WallTime mul_i64_nonnull_neon 17.3 µs 20.1 µs -13.81%
WallTime multiply_shapes_neon[(16384, PerRowPerRow)] 17.4 µs 20.1 µs -13.43%
WallTime words_gather_scalar_avx2[65536] 8.3 µs 9.4 µs -11.9%
Simulation column_x_constant[2] 517.8 µs 131 µs ×4
Simulation column_x_constant[32] 473.9 µs 131 µs ×3.6
WallTime filtered_owned_i64_avx2[NineNullsInTen] 36.8 µs 13.3 µs ×2.8
WallTime filtered_owned_i64_avx512[NineNullsInTen] 36.9 µs 13.4 µs ×2.7
WallTime filtered_owned_i64_avx2[OneNullInEight] 56.1 µs 22.2 µs ×2.5
Simulation column_x_constant[256] 742.4 µs 306 µs ×2.4
WallTime filtered_owned_i64_avx512[OneNullInEight] 62.3 µs 26.3 µs ×2.4
WallTime filtered_sink_i64_avx2[NineNullsInTen] 36.8 µs 16.4 µs ×2.3
WallTime filtered_sink_i64_avx512[NineNullsInTen] 36.9 µs 16.5 µs ×2.2
Simulation column_x_extension_constant[256] 573.8 µs 274.4 µs ×2.1
Simulation column_x_column[2] 201 µs 101.8 µs +97.52%
WallTime filtered_sink_i64_avx512[OneNullInEight] 62.2 µs 31.5 µs +97.47%
Simulation column_x_extension_constant[2] 274 µs 147.9 µs +85.31%
Simulation nullable[2] 591.4 µs 323.9 µs +82.57%
Simulation non_nullable[2] 593.6 µs 329 µs +80.44%
... ... ... ... ... ...

ℹ️ 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 (4bd332d) with ct/row-fn-tensor-l2-v2 (929ae6d)2

Open in CodSpeed

Footnotes

  1. 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.

  2. No successful run was found on ct/row-fn-tensor-l2-v2 (c11ae04) during the generation of this report, so b771900 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@connortsui20
connortsui20 force-pushed the ct/row-fn-tensor-products-v2 branch from f280e27 to 9a47353 Compare September 4, 2026 17:35
@connortsui20
connortsui20 force-pushed the ct/row-fn-tensor-products-v2 branch from 9a47353 to fa4e555 Compare September 4, 2026 17:59
@connortsui20
connortsui20 force-pushed the ct/row-fn-tensor-products-v2 branch 2 times, most recently from 6e3be68 to 288aec3 Compare September 4, 2026 18:53
@connortsui20
connortsui20 force-pushed the ct/row-fn-tensor-products-v2 branch from 288aec3 to 4f0fa1a Compare September 4, 2026 18:57
@connortsui20
connortsui20 force-pushed the ct/row-fn-tensor-products-v2 branch from 4f0fa1a to b37f665 Compare September 8, 2026 21:55
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20
connortsui20 force-pushed the ct/row-fn-tensor-products-v2 branch from b37f665 to 4bd332d Compare September 10, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/skip Do not list PR in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant