Skip to content

refactor!: split RaBitQ into core, FastScan, and index components - #139

Merged
gouyt13 merged 4 commits into
mainfrom
refactor/modular-components
Oct 13, 2026
Merged

gouyt13 merged 4 commits into
mainfrom
refactor/modular-components

Conversation

@gouyt13

@gouyt13 gouyt13 commented Oct 13, 2026

Copy link
Copy Markdown
Member

Summary

Split RaBitQ into core, fastscan, and index so applications can use quantization and batch scoring without linking ANN indexes. Core and FastScan also support builds without OpenMP.

Add the stable float32 core API v1 with caller-owned buffers and workspace, move index implementations out of public headers, and update CMake packages and examples for the new components.

This is a breaking C++ change for 0.7.0: the umbrella target and forwarding headers are removed. HNSW num_points now counts live points; num_stored_points includes removed records. Python imports and index class names stay the same, and saved index formats remain compatible with 0.6.0.

Refresh the documentation layout, expand the migration and integration guides, and clarify the rotation and FastScan precision descriptions against the papers and implementation. Historical benchmark results remain separate from measurements of this branch.

Testing

Cross-platform validation is complete. Windows checks used MSVC 2026 and Python 3.13 with native optimization disabled:

  • C++ suite: 385 passed, 12 platform/hardware skips.
  • Python suite: 691 passed, 10 platform skips, using the rebuilt extension.
  • Core/FastScan builds and consumers passed with OpenMP on and off, including source integration and relocated installations.
  • Installed package checks, standalone examples, formatting, and Python lint passed.
  • Documentation: 12 C++ examples and three Python index workflows passed; strict MkDocs build and internal links passed. All 38 benchmark table rows and 512 plotted points match the committed CSVs. Historical performance experiments were not rerun.

Full clang-tidy 15 validation remains for CI; that version was unavailable in the local Windows setup.

Expose independent CMake components and a stable float32 quantization API with
caller-owned workspace. Keep ANN implementations behind lightweight headers
and support core/FastScan consumers without OpenMP.

Consolidate SIMD dispatch and reusable query preparation, harden ownership,
index loading and Python boundaries, and expand consumer/regression coverage.
Update examples, benchmarks and documentation for the modular API.

BREAKING CHANGE: remove the umbrella target and legacy forwarding headers;
consumers must select the appropriate module targets and canonical headers.
Use a shared exported Eigen alignment policy so native libraries and generic
consumers agree on TLS/storage allocation and deallocation. Verify the ABI
requirements in installed consumers and document the configuration.

Normalize source paths before FetchContent generates its CMake subbuild, and
exercise Windows-style paths in the consumer matrix on every host.

Reject non-finite scoring comparisons. Compare successful fault-injection
attempts and retries against complete reference codes and factors while
preserving the upstream OpenMP 2.0 compatibility changes.

Validated native/generic installed and source consumers, the OpenMP ON/OFF
core/FastScan matrix, full native and sanitizer C++ suites, Python tests,
clang-tidy, formatting, and the strict documentation build on Linux x86-64.
@gouyt13
gouyt13 merged commit de793e8 into main Oct 13, 2026
45 checks passed
@gouyt13
gouyt13 deleted the refactor/modular-components branch October 13, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant