Repository navigation
Commit 3e2b65c
authored
Execute tensor product functions with RowFn (#9769)
## Summary
- Tracking Issue: #9128
- Depends on: #9768
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.
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>1 parent 47c76eb commit 3e2b65c
4 files changed
Lines changed: 247 additions & 231 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments