Repository navigation
Benchmark: DiskSeismic latency/residency/recall + OPT_LEVEL-matching link - #38
Merged
chishui merged 1 commit intoAug 28, 2026
Merged
Conversation
… OPT_LEVEL library Signed-off-by: Zirui Song <zrsong@amazon.com>
zirui-song-18
requested review from
chishui,
model-collapse and
yuye-aws
as code owners
August 28, 2026 04:49
chishui
approved these changes
Aug 28, 2026
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.
Description
Adds a DiskSeismic search mode to
sq_residency_bench(cut / k' args, selecting the block-budget path) plus a driver script and a results doc, and fixes the benchmark build to link the SIMD library matching NSPARSE_OPT_LEVEL.Kernel selection in nsparse/utils/distance_simd.h is a compile-time #if, and the -m flags live only on the per-ISA library targets (nsparse_avx2/avx512/sve); NSPARSE_OPT_LEVEL only decides which is built, so the consumer must link the matching one. The benchmarks linked the base nsparse, so they ran the scalar kernels regardless of the requested level. This selects nsparse_${OPT_LEVEL} (as nsparse/python/CMakeLists.txt does) and logs the choice.
Measured impact — same index (f32.dat, ≈122.6 GB), only the linked kernel differs; A/B/A/B interleaved, 1 warmup + 5 timed batches, 6,980 queries, single-thread mmap. DiskSeismic float32, cut=3 k'=20, recall@10 = 0.90053 (identical before/after):
Recall is bit-identical, so this is purely a code-path change (the AVX2 kernel can't hardware-gather 16-bit term ids, so only the FMA is vectorized — hence ~1.2×).
Issues Resolved
List any issues this PR will resolve, e.g. Closes [...].
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.