Skip to content

[diskann-wide] Add sumtree for 64-bit types - #1311

Open
hildebrandmw wants to merge 1 commit into
mainfrom
mhildebr/sum-64
Open

[diskann-wide] Add sumtree for 64-bit types#1311
hildebrandmw wants to merge 1 commit into
mainfrom
mhildebr/sum-64

Conversation

@hildebrandmw

Copy link
Copy Markdown
Contributor

Add SIMDSumTree requirement/impls for u64x2 and u64x4 types (and for the currently one-off i64x2 in Neon).

This is part of a series of PRs for better AVX-512 1-bit kernels.

AI Disclaimer: the author cannot currently type well, a directed agent did most of the changes. Fortunately, most are mechanical.

@hildebrandmw
hildebrandmw requested review from a team and a lite review from Copilot August 4, 2026 21:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends diskann-wide’s reduction support by adding SIMDSumTree as a requirement and providing implementations/tests for 64-bit integer SIMD vectors (u64x2, u64x4, plus i64x2 on Neon). This supports upcoming AVX-512 1-bit kernel work by making horizontal lane-sum reductions uniformly available for these types.

Changes:

  • Add Emulated<i64, {2,4}> and Emulated<u64, {2,4}> SIMDSumTree implementations and corresponding tests.
  • Implement SIMDSumTree for x86_64 u64x2/u64x4 for both V3 (direct intrinsics) and V4 (retargeting to V3).
  • Add Neon SIMDSumTree implementations for u64x2 and i64x2, and require SIMDSumTree for u64x2/u64x4 in the Architecture trait.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
diskann-wide/src/emulated.rs Adds sum-tree reductions + tests for emulated i64/u64 vectors (2/4 lanes).
diskann-wide/src/arch/x86_64/v4/u64x4_.rs Adds SIMDSumTree for u64x4 (V4), plus a reduction test.
diskann-wide/src/arch/x86_64/v4/u64x2_.rs Adds SIMDSumTree for u64x2 (V4), plus a reduction test.
diskann-wide/src/arch/x86_64/v3/u64x4_.rs Adds an intrinsic-based SIMDSumTree implementation for u64x4 (V3), plus a test.
diskann-wide/src/arch/x86_64/v3/u64x2_.rs Adds an intrinsic-based SIMDSumTree implementation for u64x2 (V3), plus a test.
diskann-wide/src/arch/mod.rs Requires SIMDSumTree on the Architecture trait’s u64x2 and u64x4 vectors.
diskann-wide/src/arch/aarch64/u64x2_.rs Adds Neon SIMDSumTree for u64x2 (with Miri fallback) + test.
diskann-wide/src/arch/aarch64/i64x2_.rs Adds Neon SIMDSumTree for i64x2 (with Miri fallback) + test.
diskann-wide/src/arch/aarch64/double.rs Adds a sum-tree test for u64x4 (implemented via Doubled<T>’s SIMDSumTree).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hildebrandmw hildebrandmw changed the title [diskann-wide] Add sumtree for 64-bit types. [diskann-wide] Add sumtree for 64-bit types Aug 4, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.47%. Comparing base (2ee97ff) to head (14ee85b).

Files with missing lines Patch % Lines
diskann-wide/src/arch/x86_64/v4/u64x2_.rs 0.00% 3 Missing ⚠️
diskann-wide/src/arch/x86_64/v4/u64x4_.rs 0.00% 3 Missing ⚠️

❌ Your patch status has failed because the patch coverage (71.42%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1311   +/-   ##
=======================================
  Coverage   91.46%   91.47%           
=======================================
  Files         516      516           
  Lines       98276    98297   +21     
=======================================
+ Hits        89891    89914   +23     
+ Misses       8385     8383    -2     
Flag Coverage Δ
miri 91.47% <71.42%> (+<0.01%) ⬆️
unittests 91.14% <71.42%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
diskann-wide/src/arch/mod.rs 83.79% <ø> (ø)
diskann-wide/src/arch/x86_64/v3/u64x2_.rs 100.00% <100.00%> (ø)
diskann-wide/src/arch/x86_64/v3/u64x4_.rs 100.00% <100.00%> (ø)
diskann-wide/src/emulated.rs 98.29% <ø> (ø)
diskann-wide/src/arch/x86_64/v4/u64x2_.rs 50.00% <0.00%> (-7.15%) ⬇️
diskann-wide/src/arch/x86_64/v4/u64x4_.rs 50.00% <0.00%> (-7.15%) ⬇️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

4 participants