Conversation
gatesn
left a comment
There was a problem hiding this comment.
Looks great! Maybe move cosine similarity into a scalar_fns module since we're going to add more.
You should also get public-api to work somehow?
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>
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>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
189c70d to
3da1787
Compare
Merging this PR will improve performance by 23.63%
Performance Changes
Comparing Footnotes
|
Summary
Adds an experimental fixed-shape tensor extension type in a new
vortex-tensorcrate.See https://vortex-data.github.io/rfcs/rfc/0024.html for info about the design of this tensor type.
Additionally adds a
CosineSimilarityexpression that takes 2 tensor arrays and computes the cosine similarity of tensors in the arrays (resulting in aPrimitiveArray).Testing
Adds some very basic tests for cosine similarity and tensor metadata operations.
Future Work
I think this was a good way to see if our
ExtVTableis not completely wrong, but at the same time this tells us nothing about what we might want to add for extension arrays on theExtVTablebecause we as long as the storageDTypeis correct, any storage array is valid.The more interesting expressions have not been implemented here. Those would include:
Additional work includes exporting to Arrow, NumPy, and PyTorch. Arrow will require a cheap translation from logical to physical shape, but other than that those conversions should be easy.