Commit 2bae3bb
chore: native ANN vector index on the Tensors stack; drop external FaissNet
Replaces the broken external FaissNet backend (its IVF/PQ path dies with a
process-fatal "Cannot load mkl_def.2.dll") with a dependency-free native ANN
index built on AiDotNet.Tensors' fused ANN kernels.
- AnnVectorIndex<T> : IVectorIndex<T> — Flat/IVF/PQ/IVFPQ over Tensors' AnnIndex.
Bridges the incremental Add/Remove/Search index contract onto a train-then-
populate ANN index via a live-vector source of truth + lazy rebuild, and
AttachGpu() dispatches to the fused GPU ANN kernels across all 7 backends,
falling back to the managed CPU reference. Reuses the existing
VectorIndexDocumentStore adapter, so it plugs into the RAG facade unchanged.
- AiModelBuilder.ConfigureNativeAnnIndex(...) (on both IAiModelBuilder and the
concrete builder) surfaces it from the facade with optional GPU acceleration.
- Bump AiDotNet.Tensors 0.114.0 -> 0.118.0 (brings Tensors #824, the native
ANN kernel stack — the gating dependency).
- Remove the AiDotNet.Storage.Faiss project, its tests, the FaissNet package
reference, and all solution/csproj wiring: the native path supersedes it and
takes no external native dependency.
Tests: AnnVectorIndexTests 9/9 green on net471 + net10 (exact flat NN,
in-cluster recall for IVF/PQ/IVFPQ on separable clusters, Add/Remove/Clear/
AddBatch/cosine-normalization).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent b9222e9 commit 2bae3bb
14 files changed
Lines changed: 490 additions & 1320 deletions
File tree
- src
- AiDotNet.Storage.Faiss
- RetrievalAugmentedGeneration/DocumentStores
- Interfaces
- RetrievalAugmentedGeneration/VectorSearch/Indexes
- tests/AiDotNet.Tests
- Storage
- UnitTests/RetrievalAugmentedGeneration/VectorSearch/Indexes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
| |||
185 | 183 | | |
186 | 184 | | |
187 | 185 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | 186 | | |
201 | 187 | | |
202 | 188 | | |
| |||
255 | 241 | | |
256 | 242 | | |
257 | 243 | | |
258 | | - | |
259 | 244 | | |
260 | 245 | | |
261 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
253 | 258 | | |
254 | 259 | | |
255 | 260 | | |
| |||
310 | 315 | | |
311 | 316 | | |
312 | 317 | | |
313 | | - | |
314 | 318 | | |
315 | 319 | | |
316 | 320 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments