Add remaining bulk float32 off-heap scoring similarities#15037
Add remaining bulk float32 off-heap scoring similarities#15037ChrisHegarty merged 8 commits intoapache:mainfrom
Conversation
|
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR. |
|
We're growing the number of vector distance implementations, which is a bit concerning. However, the implementations in this PR are straightforward, no unrolling, no vector-width specific version, etc, and they are all well covered by new and existing tests. So this should be fine. We can review what we have at some future point if necessary. |
|
Note to self: verify the benchmark with |
|
I ran on AVX256 (FMA enabled) Yep, bulk scoring is consistently better :) |
|
Dumping some jmh results.
linux-arm: c7g.4xlarge, Graviton 3, Neoverse-V1, preferredBitSize=256 linux-x64: m6i.2xlarge, Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz, preferredBitSize=512 linux-amd64: m6a.4xlarge, AMD EPYC 7R13 Processor, preferredBitSize=256 |
benwtrent
left a comment
There was a problem hiding this comment.
Do we want to wait until we get a bench run justifying the dot-product change first?
Intuitively, this should be better (all benchmarking indicates bulk off-heap improves things), but we should justify with end-to-end benchmarking :)
|
@ChrisHegarty lucene nightlies indeed showed an improvement in dot-product! Looks good! |
This commit adds the remaining bulk float32 off-heap scoring similarities, cosine, euclidean, and max inner product. The changes in apache#14980 deliberately added only dot product, to avoid additional bloat on the PR and benchmarking. This PR now refactors things a little to allow for the remaining similarities to be added. Benchmarking will be carried out on them independently, as well as consideration for not negatively affecting dot product. relates apache#14980
This commit adds the remaining bulk float32 off-heap scoring similarities, cosine, euclidean, and max inner product. The changes in apache#14980 deliberately added only dot product, to avoid additional bloat on the PR and benchmarking. This PR now refactors things a little to allow for the remaining similarities to be added. Benchmarking will be carried out on them independently, as well as consideration for not negatively affecting dot product. relates apache#14980
This commit adds the remaining bulk float32 off-heap scoring similarities, cosine, euclidean, and max inner product.
The changes in #14980 deliberately added only dot product, to avoid additional bloat on the PR and benchmarking. This PR now refactors things a little to allow for the remaining similarities to be added. Benchmarking will be carried out on them independently, as well as consideration for not negatively affecting dot product.
relates #14980