JingsongLi opened a new pull request, #121:
URL: https://github.com/apache/paimon-vector-index/pull/121

   IVF-SQ's blocked reader uses generic per-dimension loops for inner-product 
and cosine scoring. Add row-parallel NEON and AVX2 kernels for the SQ32 layout, 
with scalar fallback, while preserving the existing score arithmetic.
   
   The reader selects the new path for IP lists with at least 96 rows and 
cosine lists with at least 32 rows. Shorter lists use the original scan. The 
original SQ entry points, L2 arithmetic, filtering/collection behavior, public 
APIs, and storage format are preserved.
   
   Regression tests cover exact score bits against the original scan, 
block/tail and dispatch boundaries, checked cosine zero/non-finite inputs, and 
range membership around rounding-sensitive boundaries. The diff contains only 
`core/src/sq.rs` and `core/src/ivfsq_io.rs`; benchmark drivers, benchmark 
registration, results, and design documentation are excluded.
   
   ### Local performance
   
   Measured against `cab7541` on Apple M4 Pro ARM64, Rust 1.95 release, two 
threads, warm readers, 64 queries, Top-10, nlist=256, nprobe=16. The 
final-source A/B campaign used three alternating process pairs and at least 750 
ms per timed mode; flagged cases received a separate five-pair confirmation. 
Cores and frequency were not pinned.
   
   | Dataset / metric | Single QPS change | Batch QPS change |
   | --- | ---: | ---: |
   | GloVe, 1,183,514 x 100, IP | +10.7% | +10.5% |
   | Cohere, 1M x 768, cosine | +123.7% | +125.1% |
   | SIFT, 1M x 128, L2 control | -0.5% | -0.6% |
   
   These are workload-specific ARM64 measurements, not AVX2 performance claims. 
The local measurement driver and result artifacts are kept outside this PR.
   
   ### Validation
   
   - The final production files match the SHA-256 hashes recorded for the 
tested native binaries.
   - Local workspace tests: 736 passed, 2 ignored. This total includes 24 local 
benchmark-helper tests excluded from this diff.
   - Formatting, strict workspace/all-target Clippy, license and diff checks 
passed.
   - A clean worktree of commit `193aec9`, without the excluded benchmark files 
or registrations, passes formatting and strict workspace/all-target Clippy.
   - x86_64-apple-darwin test compilation passed; native x86/AVX2 execution and 
IP/cosine performance remain to be verified.
   - The final source completed 20 critical benchmark cases, three 
configurations of the unchanged project `ann_bench`, and five targeted 
follow-up cases, with configuration and ID/score fingerprint checks.
   - An earlier routing variant completed a 720-case matrix with no execution 
or numerical-check failures and 16 performance flags. The full matrix was not 
rerun after the final short-list routing change.
   
   ### Draft: unresolved tiny-list measurements
   
   The 16-vector fixtures (16 lists with one row each) still have unresolved 
single-query throughput differences:
   
   | Fixture | Initial final-source A/B | Targeted follow-up |
   | --- | ---: | ---: |
   | IP, 768D, retain all rows | -6.5% | -2.6% |
   | IP, 768D, retain about 1/32 rows | -9.3% | -4.5% |
   | Cosine, 64D, retain about 1/32 rows | -15.2% | +4.3% |
   
   These fixtures use the original generic SQ path. Same-binary controls also 
varied, and separate linked probes were sensitive to their compilation/link 
context. A unique cause has not been established; these differences are not 
claimed as resolved or dismissed as noise.
   
   This remains a draft pending native AVX2 validation and review of the 
tiny-list tradeoff.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to