You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release v0.2.4: Stateless Searcher pipeline, contiguous batch search, and unified Python search API
- Refactor SearcherBase & SearcherImpl to be fully stateless and thread-safe with per-query eps and rerank_factor parameters
- Introduce SearchResultBatch flat contiguous container and zero-allocation span-based batch search
- Separate result unpacking and distance copying into branchless sequential loops in populate_graph_results and drain_heap_into
- Modernize candidate reranking API (deglib::search::rerank) with explicit return_distances and unsorted flags
- Unify Python Searcher.search to handle single-query vectors (1D, 1xDim, Dimx1) and multithreaded 2D batches seamlessly
- Optimize FP16 scalar quantization via 64-element chunked SIMD streaming and encapsulate internal quantizer transforms
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,35 @@
1
1
# Release Notes
2
2
3
+
## deglib v0.2.4
4
+
5
+
### Overview
6
+
deglib v0.2.4 refactors the query execution pipeline to be fully stateless and thread-safe, eliminates query-time allocations, streamlines candidate reranking, and optimizes FP16 quantization kernels. It updates `Searcher` to accept search parameters (`eps`, `rerank_factor`) directly per query, adds contiguous flat batch search (`SearchResultBatch`), separates inner loop branches for result extraction, and consolidates the Python search interface.
7
+
8
+
---
9
+
10
+
### ⚠️ Breaking Changes & Migration Guide
11
+
12
+
***Stateless `Searcher` API:** Removed mutable internal search parameters (`search_eps_`, `rerank_factor_`) and their setters/getters (`set_query_arguments`, `set_search_eps`, `set_rerank_factor`). `eps` and `rerank_factor` are now query-level parameters passed directly to `search()` and `search_batch()`.
13
+
***Rerank API Consolidation (`deglib::search::rerank`):** Removed disparate internal helpers (`rerank_into`, etc.) and exposed overloaded `deglib::search::rerank` functions with explicit `return_distances` and `unsorted` boolean flags.
14
+
***Unified Python `Searcher.search`:** Single entry point handling 1D vectors, row-vectors `(1, dim)`, column-vectors `(dim, 1)`, and 2D batch matrices `(N, dim)` with `threads`. Removed redundant `search_batch` from the Python class.
***Reentrant Querying:** Searcher instances are fully thread-safe and reentrant, allowing multiple threads to query the same instance with varying `eps` and `rerank_factor` trade-offs without data races or locks.
22
+
***Branch-Free Result Extraction:** Separated neighbor index unpacking and optional distance copying into distinct, branchless loops (`populate_graph_results` and `drain_heap_into`) to eliminate per-element conditional branches on the hot path.
23
+
***Contiguous Batch Search (`SearchResultBatch`):** Flat 1D vector layout for indices and distances (`n_queries * k`) with zero-overhead `get_indices(q)` and `get_distances(q)` row slicing. Supports zero-allocation execution with user-provided `std::span` buffers.
24
+
***Small Buffer Optimization (SBO):** Uses stack buffers for transformed query bytes and candidate indices for vectors $\le 512$ bytes, avoiding heap allocations during search.
***Zero-Overhead End-to-End Querying:** Integrates query quantization (FP32/FP16 $\rightarrow$ INT8/UINT8/EVP), graph traversal on quantized indices, and SIMD candidate refinement against FP16/FP32 base features in a single C++ call.
* Compile-time `if constexpr` branch elimination avoiding virtual method dispatch in the hot search loop.
16
-
* Full support for all quantizers (`NoQuantizer`, `ScalarInt8Quantizer`, `ScalarInt8PerDimQuantizer`, `ScalarUint8Quantizer`, `ScalarUint8PerDimQuantizer`, `EVPQuantizer`).
46
+
* Full support for all quantizers (`NoQuantizer`, `ScalarQuantizerInt8`, `ScalarQuantizerInt8PerDim`, `ScalarQuantizerUint8`, `ScalarQuantizerUint8PerDim`, `EVPQuantizer`).
17
47
* Support for unquantized and quantized candidate refiners (`NoRefiner`, `ExactRefiner<uint16_t>`, `ExactRefiner<float>`).
18
48
***Modern C++20 Interface:**
19
49
*`std::span<const T>` and `SearchResult` helpers for safe, expressive, and allocation-free querying.
0 commit comments