Add Qvec.MicroBenchmarks and record the kernel and search baseline - #45
Merged
Merged
Conversation
BenchmarkDotNet project with three suites: the float distance kernels (array, span and the pointer variant the graph walk calls) next to TensorPrimitives as a reference; the int8 quantise/dequantise/dot path; and one Search call on a 10,000-node index with the memory diagnoser. The two pointer kernels become internal so they can be measured; Core gets InternalsVisibleTo for the benchmark project only. Measured on the reference machine and recorded in design-performance.md section 2.1: the hot kernels are within 5 % of TensorPrimitives at 768 and 1536 dimensions (the 128-d dot product is 1.5x off), so the kernel item in the plan is downgraded; a single Search allocates 30-68 KB and triggers gen1 collections, so the query-scratch item moves to the front. Sections 4.1/4.2 and the PR table are reordered accordingly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Qvec.MicroBenchmarks and record the kernel and search baseline
BenchmarkDotNet project with three suites: the float distance kernels
(array, span and the pointer variant the graph walk calls) next to
TensorPrimitives as a reference; the int8 quantise/dequantise/dot path;
and one Search call on a 10,000-node index with the memory diagnoser.
The two pointer kernels become internal so they can be measured; Core
gets InternalsVisibleTo for the benchmark project only.
Measured on the reference machine and recorded in design-performance.md
section 2.1: the hot kernels are within 5 % of TensorPrimitives at 768
and 1536 dimensions (the 128-d dot product is 1.5x off), so the kernel
item in the plan is downgraded; a single Search allocates 30-68 KB and
triggers gen1 collections, so the query-scratch item moves to the front.
Sections 4.1/4.2 and the PR table are reordered accordingly.
Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com