Turbovec: add vector index C API foundation - #211
Conversation
Assisted-by: GPT-5.5
Fix malformed snapshot handling, reserved padding IDs, finite input validation, score clamping, and PR1 test isolation. Make the vector-index foundation default-off behind a standalone target.
Export vector-index symbols correctly in shared builds by propagating GGML_SHARED, and enable GGML_VECTOR_INDEX in Linux and Windows shared CI so the library and test target are exercised.
Reject non-zero reserved v1 header bytes, expand malformed snapshot and invalid API coverage, and fix ggml package configuration paths.
Make snapshot writes atomic, tighten API edge-case handling, and add CI coverage for package exports and static consumers.
Assisted-by: GPT-5.5
Fix vector-index API semantics, snapshot I/O safety, search ranking, and package smoke checks.
Avoid GCC attribute warnings from the FILE deleter and keep POSIX snapshot writes restrictive until publish. Preserve existing file modes, apply default creation permissions for new files, and cover the permission behavior in tests.
Avoid exact reserve calls during add by growing storage capacity with slack and only reserving the id map when insertion would rehash.
Sync the temporary snapshot again after chmod, fsync the parent directory after rename, and report post-rename sync failures as GGML_VEC_INDEX_E_NOT_DURABLE.
Assisted-by: GPT-5.5
Fix vector-index snapshot durability on Windows and macOS, tighten byte-span overflow validation, and cover static package consumers in CI.
Fix vector-index snapshot durability on Windows and macOS, tighten byte-span overflow validation, and cover static package consumers in CI.
Add regression coverage that a failed atomic write targeting an existing valid snapshot leaves the snapshot bytes unchanged.
…p installs and the jinja2 import check.
… both pip installs and the jinja2 import check." This reverts commit 7be3d08. Assisted-by: GPT-5.5
Run converter installs and imports through the CI virtualenv interpreter so macOS self-hosted jobs do not fall back to a Python without jinja2 or torch. Assisted-by: GPT-5.5
Restore the CI script after confirming the Apple GPU failure comes from the self-hosted runner Python version rather than converter interpreter selection. Assisted-by: GPT-5.5
Assisted-by: GPT-5.5
Assisted-by: GPT-5.5
Assisted-by: GPT-5.5
Assisted-by: GPT-5.5
Use an AVX2-compatible sign-extension sequence for q4/q8 search and add focused quantized reference and IVF recall coverage.
Harden quantized scoring, IVF probing, remove semantics, and vector-index packaging while moving the private build wiring into the vector-index subdirectory.
Align the vector-index persistence API/docs with the implemented f32 snapshot support, make snapshot writes atomic and safer, and add regression coverage for malformed loads, unsupported modes, filter validation, and quantized IVF edge cases.
Assisted-by: GPT-5.5
Keep file-local capacity helpers internal so fatal-warning builds do not reject them for missing prototypes.
Clarify the Rust turbovec v0.9.0 Ziggurat and statrs-derived constants, and add focused coverage for the full normal table and TQ+ beta quantiles.
Use the PR3 temp-path test style and avoid non-finite q8 IVF scoring in the rebased stack. Assisted-by: GPT-5.5
Resolve PR3 rebase fallout in delta replay locking and vector-index tests so the rebased stack builds and runs cleanly. Assisted-by: GPT-5.5
Adapt the rebased tail-recovery regression to PR3 test helpers and align zero-row logged-add coverage with the PR2d delta-start policy. Assisted-by: GPT-5.5
Fix TurboVec calibration persistence edge cases, make failed delta replay rollback safer, and add regression coverage for zero-scale rows, legacy calibration snapshots, and partial replay failures.
Fix delta-log replay, legacy recovery, TurboVec dimension compatibility, and static pkg-config coverage for vector-index builds.
Keep the PR2d replay and durability checks after rebasing PR3 onto the delta-log branch. Assisted-by: GPT-5.5
Keep direct q8 and q4 row quantization under nearest rounding so added vectors do not depend on the caller's active rounding mode.
Add batched Accelerate query rotation and fused 4-query TurboVec LUT scoring, with platform guards and regression coverage to keep search results stable across scalar, NEON, and Apple targets. Also fix related CI/package checks.
Keep TurboVec persisted derivations under nearest rounding and make the TQ+ LUT parity hook independent of backend query rotation. Align remove_logged API docs with its error-code return convention.
Avoid including private vector-index internals in the production smoke test while preserving hook-only coverage for snapshot temp-file cleanup. Assisted-by: GPT-5.5
Bound the reader loop before exercising add/remove mutations so static ARM64 runs do not depend on shared_mutex writer fairness.
Assisted-by: GPT-5.5
Restore delta-bound mutation, mmap version, and symlink coverage after rebasing the TurboVec test suite. Assisted-by: GPT-5.6 Sol
Assisted-by: GPT-5.5
Declare the test-only addressability hook before its definition so fatal-warning builds do not fail on missing declarations.
Accept hardlink aliases during delta compaction using the existing inode-aware path check, and tighten vector-index tests so concurrent and mmap searches validate returned ids and scores.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Review StatusCurrent Status: ❌ PENDING Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member. |
Summary
Rebasing this again for branch temp-10297
Adds the initial standalone
ggml-vector-indexC API foundation.ggml_vec_index_*public API surface.test-vector-indexcoverage for API behavior.Test plan
cmake -S . -B build -DGGML_VECTOR_INDEX=ON -DLLAMA_BUILD_TESTS=ONcmake --build build --target test-vector-indexctest --test-dir build -R '^test-vector-index$' --output-on-failureRelated PR
embed: tetherto/qvac#3292
Original reference
https://github.com/RyanCodrai/turbovec