Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
ae6886b
linalg: add fallible lower-triangular AAT kernel
SeliMeli Jul 28, 2026
8da96e4
pipnn: add dispatched numerical kernels
SeliMeli Jul 28, 2026
15d8365
pipnn: benchmark and exercise numerical kernels
SeliMeli Jul 28, 2026
5b56fda
pipnn: harden kernel coverage and benchmarks
SeliMeli Jul 28, 2026
846bf59
fix(pipnn): accept finite maximum distances
SeliMeli Jul 29, 2026
35f65ca
refactor(pipnn): make kernels architecture-neutral
SeliMeli Jul 29, 2026
b25d701
fix(pipnn): preserve NaN distances across SIMD backends
SeliMeli Jul 30, 2026
7ba81b6
docs(pipnn): explain numerical kernel invariants
SeliMeli Jul 31, 2026
0090fea
test(pipnn): name SIMD metric boundary matrices
SeliMeli Jul 31, 2026
03277f6
fix(pipnn): preserve dispatched kernel semantics
SeliMeli Aug 3, 2026
218cc38
style(wide): format array trait bounds
SeliMeli Aug 3, 2026
b7cd61d
fix(pipnn): address kernel review feedback
SeliMeli Aug 3, 2026
7153969
refactor(pipnn)!: prepare kernel dispatch
SeliMeli Aug 3, 2026
ad2d7dc
docs(pipnn): describe full crate scope
SeliMeli Aug 3, 2026
7025c22
docs(pipnn): map dispatch hot paths
SeliMeli Aug 3, 2026
d16d946
test(pipnn): confine traversal references
SeliMeli Aug 3, 2026
da45d8e
refactor(pipnn): name metric visitor by action
SeliMeli Aug 3, 2026
699d11b
refactor(pipnn): carry dynamic leaf width
SeliMeli Aug 3, 2026
400e91a
refactor(pipnn)!: clarify point and neighbor roles
SeliMeli Aug 3, 2026
afe1d38
docs(pipnn): explain kernel pipeline
SeliMeli Aug 3, 2026
d4a1230
docs(pipnn): state cosine threshold
SeliMeli Aug 3, 2026
85ec4cc
refactor(pipnn): move kernels into diskann graph
SeliMeli Aug 5, 2026
e3d20a6
test(pipnn): document fixture panic policy
SeliMeli Aug 5, 2026
1bf66b2
ci(pipnn): cover the in-crate feature
SeliMeli Aug 5, 2026
44fb69a
bench(pipnn): add IAI kernel microbenchmarks
SeliMeli Aug 5, 2026
318f8ea
fix(ci): use workspace feature name for pipnn
SeliMeli Aug 6, 2026
c13226d
fix(ci): validate every stacked layer
SeliMeli Aug 6, 2026
22ca492
ci(pipnn): run IAI and ARM feature gates
SeliMeli Aug 6, 2026
db4b711
test(pipnn): keep regression tooling local
SeliMeli Aug 6, 2026
6dfc07b
ci(pipnn): validate numerical feature
SeliMeli Aug 6, 2026
8ce46fc
fix(pipnn): enforce SIMD safety invariants
SeliMeli Aug 7, 2026
1d49dab
refactor(pipnn): pass leaf matrices directly
SeliMeli Aug 7, 2026
ad19c82
refactor(pipnn): cap leaf kernel at k three
SeliMeli Aug 7, 2026
9628de5
fix(pipnn): return errors for invalid leaf widths
SeliMeli Aug 7, 2026
88d06c1
fix(utils): reject overflowing matrix shapes
SeliMeli Aug 7, 2026
6f23dee
refactor(pipnn): trust validated matrix views
SeliMeli Aug 7, 2026
88f6f72
perf(pipnn): retain measured fixed-k insertion
SeliMeli Aug 7, 2026
815c2a4
docs(pipnn): remove stale dynamic-k reference
SeliMeli Aug 7, 2026
bf989e2
refactor(pipnn): constrain SIMD lanes locally
SeliMeli Aug 7, 2026
51684ad
refactor(pipnn): remove stored kernel pointers
SeliMeli Aug 7, 2026
98be0dc
test(pipnn): cover runtime partition fanout
SeliMeli Aug 7, 2026
96ceb24
refactor(pipnn): make kernels generic-only
SeliMeli Aug 7, 2026
465a96b
refactor(pipnn): keep numerical kernels private
SeliMeli Aug 7, 2026
32d6524
refactor(pipnn): use default kernel workspaces
SeliMeli Aug 7, 2026
038c069
docs(pipnn): align kernel comments with implementation
SeliMeli Aug 7, 2026
df9061a
docs(pipnn): remove kernel performance notes
SeliMeli Aug 7, 2026
aa948a6
refactor(pipnn): report partition underfill locally
SeliMeli Aug 7, 2026
163cff7
refactor(pipnn): remove unused leaf output helper
SeliMeli Aug 7, 2026
f945817
refactor(pipnn): remove kernel assertions
SeliMeli Aug 7, 2026
6d0dc2b
docs(pipnn): state partition row contract
SeliMeli Aug 7, 2026
b7e4db7
refactor(pipnn): name kernel responsibilities
SeliMeli Aug 7, 2026
bf7cead
docs(pipnn): define partition leader semantics
SeliMeli Aug 7, 2026
fd0f4e2
docs(pipnn): state norm conversion behavior
SeliMeli Aug 7, 2026
6671cc8
refactor(pipnn): name fixed-width leaf scan
SeliMeli Aug 7, 2026
b40d54c
docs(pipnn): remove type-restatement comments
SeliMeli Aug 7, 2026
1813388
docs(pipnn): describe leaf insertion by domain role
SeliMeli Aug 7, 2026
fe5a29c
refactor(pipnn): name kernel test helpers
SeliMeli Aug 7, 2026
e707437
refactor(pipnn): inline fixed-width leaf dispatch
SeliMeli Aug 10, 2026
a1bdc73
refactor(pipnn): inline leader ID publication
SeliMeli Aug 10, 2026
1f8ae26
refactor(matrix): preserve constructor behavior
SeliMeli Aug 10, 2026
617e746
refactor(pipnn): split stage metric contracts
SeliMeli Aug 10, 2026
05ad4da
perf(pipnn): specialize stage norm handling
SeliMeli Aug 10, 2026
dc5cdba
docs(pipnn): use active metric comments
SeliMeli Aug 10, 2026
e32b0a3
test(pipnn): use norm-specific terminology
SeliMeli Aug 10, 2026
00b69ce
perf(pipnn): bound leaf SIMD prefix once
SeliMeli Aug 10, 2026
21885e6
refactor(pipnn): remove metric tag indirection
SeliMeli Aug 10, 2026
803f981
docs(pipnn): keep metric comments factual
SeliMeli Aug 10, 2026
b28d67a
refactor(pipnn): pass prepared norms to kernels
SeliMeli Aug 11, 2026
afbb576
perf(pipnn): specialize prepared norm layouts
SeliMeli Aug 11, 2026
17aea03
perf(pipnn): reuse each leaf source norm
SeliMeli Aug 11, 2026
0dccf08
refactor(pipnn): name prepared norm layouts
SeliMeli Aug 11, 2026
a3396a5
refactor(pipnn): make metric types prepare norms
SeliMeli Aug 11, 2026
9d4342a
refactor(pipnn): move norm policy into metric types
SeliMeli Aug 11, 2026
52bc12a
test(utils): cover zero-wrapping matrix area
SeliMeli Aug 11, 2026
cc82f9c
refactor(pipnn): give metrics exact ranking inputs
SeliMeli Aug 11, 2026
09704bd
refactor(pipnn): deepen numerical kernels
SeliMeli Aug 12, 2026
38cd3b5
fix(pipnn): mark unrankable kernel slots
SeliMeli Aug 18, 2026
b946ace
refactor(pipnn): centralize SIMD schema
SeliMeli Aug 20, 2026
52973f5
refactor(pipnn): specialize sorted insertion
SeliMeli Aug 21, 2026
f55a5d0
test(pipnn): clarify numerical contracts
SeliMeli Aug 21, 2026
2de5c86
test(pipnn): use semantic numerical fixtures
SeliMeli Aug 24, 2026
d786552
refactor(wide): keep lane arrays read-only
SeliMeli Aug 24, 2026
17ea40f
test(pipnn): clarify norm test names
SeliMeli Aug 24, 2026
a60773c
test(pipnn): cover SIMD and insertion contracts
SeliMeli Aug 24, 2026
fca286a
refactor(pipnn): use one SIMD vector type
SeliMeli Aug 24, 2026
89d6071
test(pipnn): expose production kernel calls
SeliMeli Aug 24, 2026
c35b944
fix(pipnn): align metric edge cases
SeliMeli Aug 25, 2026
816a34f
docs(pipnn): correct leaf width contract
SeliMeli Aug 25, 2026
6844cfa
ci(pipnn): run kernels under Miri
SeliMeli Aug 25, 2026
1f0a5f1
test(pipnn): cover kernel behavior contracts
SeliMeli Aug 25, 2026
056bef7
refactor(pipnn): localize SIMD lane bounds
SeliMeli Aug 26, 2026
5370050
fix(pipnn): retarget worker SIMD kernels
SeliMeli Aug 28, 2026
01b7649
fix(pipnn): unify cosine norm reduction
SeliMeli Aug 28, 2026
c452181
test(linalg): assert zero-row success
SeliMeli Sep 3, 2026
57a2b7a
test(linalg): clarify zero-dimension result
SeliMeli Sep 3, 2026
6d825d3
refactor(pipnn): simplify metric kernels
SeliMeli Sep 4, 2026
b46ecdd
refactor(pipnn): remove metric architecture input
SeliMeli Sep 4, 2026
b3aade5
refactor(pipnn): simplify numerical seams
SeliMeli Sep 7, 2026
55fd99b
refactor(pipnn): simplify leaf kernel flow
SeliMeli Sep 7, 2026
adf0897
refactor(pipnn): scan distance matrix views
SeliMeli Sep 7, 2026
b308086
refactor(pipnn): share top-k state and trim tests
SeliMeli Sep 7, 2026
5f85a35
refactor(pipnn): simplify top-k insertion
SeliMeli Sep 8, 2026
2c26d8b
docs(pipnn): clarify ranking contracts
SeliMeli Sep 8, 2026
00b8a5c
fix(pipnn): address kernel review feedback
SeliMeli Sep 8, 2026
927ceb6
refactor(pipnn): move distance blocks to topk
SeliMeli Sep 8, 2026
5ef1097
test(pipnn): simplify partition row rejection
SeliMeli Sep 8, 2026
f803283
refactor(pipnn): merge SIMD schema traits
SeliMeli Sep 8, 2026
303ff6d
refactor(pipnn): encapsulate top-k updates
SeliMeli Sep 9, 2026
4a3aed7
test(pipnn): focus coverage on live contracts
SeliMeli Sep 9, 2026
dc10909
refactor(pipnn): borrow top-k buffers per call
SeliMeli Sep 9, 2026
78f5e95
fix(pipnn): keep SIMD scope inside top-k
SeliMeli Sep 10, 2026
c627be8
fix(ci): run relocated top-k tests under Miri
SeliMeli Sep 10, 2026
6a8d13e
perf(pipnn): specialize top-k widths through ten
SeliMeli Sep 10, 2026
acda584
refactor(pipnn): make insertion capacity explicit
SeliMeli Sep 10, 2026
5e4c08a
refactor(pipnn): model top-k width with types
SeliMeli Sep 16, 2026
08c2fba
refactor(pipnn): localize insertion slicing
SeliMeli Sep 17, 2026
1bc033d
refactor(pipnn): name top-k update directions
SeliMeli Sep 17, 2026
fa560c3
test(pipnn): cover numerical kernel matrices
SeliMeli Sep 17, 2026
d0f048d
refactor(pipnn): simplify workspace access
SeliMeli Sep 17, 2026
4e75562
test(pipnn): clarify neighbor selection cases
SeliMeli Sep 17, 2026
d3ae858
test(pipnn): rewrite numerical kernel contracts
SeliMeli Sep 17, 2026
4690241
refactor(pipnn): dispatch TopK with a visitor
SeliMeli Sep 18, 2026
34722b2
refactor(pipnn): reuse fast vector norms
SeliMeli Sep 18, 2026
4c97081
test(linalg): share lower-product assertions
SeliMeli Sep 18, 2026
5b853e0
test(linalg): trim redundant GEMM shapes
SeliMeli Sep 18, 2026
9660547
refactor(pipnn): defer matrix view hardening
SeliMeli Sep 18, 2026
166ac25
fix(pipnn): expect unwired kernels in PR2
SeliMeli Sep 18, 2026
354918d
docs(pipnn): track NEON validation in #1423
SeliMeli Sep 21, 2026
08f5fd0
docs(linalg): clarify lower-product storage
SeliMeli Sep 22, 2026
8b85bf7
test(linalg): simplify lower-product assertions
SeliMeli Sep 22, 2026
8e2d9d6
test(pipnn): consolidate numeric sweeps
SeliMeli Sep 22, 2026
a439b6b
refactor(pipnn): shorten SIMD trait name
SeliMeli Sep 22, 2026
12dd73f
refactor(pipnn): align Width method naming
SeliMeli Sep 22, 2026
9d45ac7
ci(pipnn): focus Miri on TopK boundaries
SeliMeli Sep 22, 2026
6df51c8
ci(pipnn): separate ARM runner addition
SeliMeli Sep 22, 2026
f673e95
ci(pipnn): remove kernel tests from SDE
SeliMeli Sep 22, 2026
470915d
perf(pipnn): limit TopK specializations
SeliMeli Sep 22, 2026
5ecfd4a
perf(pipnn): avoid duplicate threshold fills
SeliMeli Sep 22, 2026
e4c3edd
refactor(pipnn): bind TopK storage to rankers
SeliMeli Sep 22, 2026
b0ccf73
refactor(pipnn): replace TopK rankers with direct selection
SeliMeli Sep 23, 2026
cc6da38
refactor(pipnn): check top-k shapes only in debug builds
SeliMeli Sep 23, 2026
e9c7ff4
fix(pipnn): assert the vector lane count before group loads
SeliMeli Sep 24, 2026
6779f44
ci: run coverage with all features
SeliMeli Sep 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ jobs:
cargo llvm-cov nextest --locked \
--config "$RUST_CONFIG" \
--workspace \
--all-features \
--lcov --output-path lcov.info

- name: Generate miri code coverage
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,13 @@ jobs:
run: cargo +nightly miri nextest run --locked --package diskann-quantization
env:
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance

- name: PiPNN top-k group loads
env:
MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance
# One selection over two full groups and one pair scan over two full groups
# reach all three unsafe group loads in the top-k module.
run: |
cargo +nightly miri test --locked -p diskann --features pipnn --lib -- \
graph::pipnn::topk::tests::selection_returns_distinct_candidates_when_distances_tie \
graph::pipnn::topk::tests::a_single_pair_updates_exactly_its_two_endpoints::case_1_finite
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions diskann-linalg/src/faer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,47 @@ pub(super) fn sgemm_impl(
faer::linalg::matmul::matmul(c, beta, a, b, alpha, Par::Seq)
}

/// Replace the lower triangle of `C` with `alpha * A * Aᵀ`.
pub(super) fn sgemm_aat_lower_impl(m: usize, k: usize, alpha: f32, a: &[f32], c: &mut [f32]) {
sgemm_aat_lower_operation(faer::Accum::Replace, m, k, alpha, a, c);
}

/// Add the lower triangle of `alpha * A * Aᵀ` to `C`.
pub(super) fn sgemm_aat_lower_add_impl(m: usize, k: usize, alpha: f32, a: &[f32], c: &mut [f32]) {
sgemm_aat_lower_operation(faer::Accum::Add, m, k, alpha, a, c);
}

/// Apply one lower-triangle accumulation mode.
///
/// The public wrapper validates both matrix shapes. Faer writes the diagonal
/// and lower triangle. Faer does not read or write the upper triangle.
fn sgemm_aat_lower_operation(
accumulation: faer::Accum,
m: usize,
k: usize,
alpha: f32,
a: &[f32],
c: &mut [f32],
) {
use faer::linalg::matmul::triangular::{matmul, BlockStructure};

let a = faer::mat::MatRef::from_row_major_slice(a, m, k);
let at = a.transpose();
let c = faer::mat::MatMut::from_row_major_slice_mut(c, m, m);

matmul(
c,
BlockStructure::TriangularLower,
accumulation,
a,
BlockStructure::Rectangular,
at,
BlockStructure::Rectangular,
alpha,
Par::Seq,
);
}

/// See the documentation for `svd_into`.
///
/// The implementation may assume the the specified invariants hold for the sizes of the
Expand Down
Loading
Loading