Skip to content

Normalized Vector#7251

Draft
connortsui20 wants to merge 1 commit intodevelopfrom
ct/norm-vectors
Draft

Normalized Vector#7251
connortsui20 wants to merge 1 commit intodevelopfrom
ct/norm-vectors

Conversation

@connortsui20
Copy link
Copy Markdown
Contributor

Summary

Continuation of #7107.

Since we want to add a bunch of new vector encodings that rely on unit normalization (spherical transform, turboquant), we would like to introduce this as an encoding.

Note that once we eventually have #6717, the operations will be a lot less ugly.

Also, we can only do the broadcasting trick with RunEnd and Sequence array multiplication on the decompress side, we can't do it on the compress side because we may potentially divide by 0 (and we can't intercept that and say return 0 in that case).

There is an open question on if, instead of representing this as a physical encoding, we should have scalar encodings like this one (others include FoR and ZigZag) be scalar functions. Whatever we decide, we should probably just merge this first as we can always change this later.

Open Questions

  • Do we want a helper function for creating a new expression and applying it to an array?

API Changes

Adds a new vector encoding to the vortex-tensor crate.

Testing

Basic tests.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant