CAGRA-ACE: Support Direct HNSW Index Creation During Build - #2539
Open
julianmi wants to merge 1 commit into
Open
CAGRA-ACE: Support Direct HNSW Index Creation During Build#2539julianmi wants to merge 1 commit into
julianmi wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
hnsw::buildusing CAGRA-ACE on-disk builds a CAGRA index on disk and useshnsw::from_cagrato build an HNSW index from the ACE intermediate files. This patch adds support to directly create an HNSW index during ACE builds. It streams partitioned graph data into HNSW format with transactional publication, KvikIO-based I/O, and GPU hierarchy support. This speeds up the end-to-end runtime by removing a disk read of the full CAGRA graph. An exemplary BIGANN-100M build on an L40S GPU shows 8.14% end-to-end speedup with direct POSIX I/O on a consumer NVMe.The direct CAGRA-ACE disk path does not produce a byte-identical HNSW index. Mainline assigns hierarchy levels with
hnswlib’s stateful RNG after ACE reordering; the fused path uses deterministic per-ID levels and partitioned hierarchy construction. This changes maximum levels, internal IDs, and neighbor lists while preserving a validhnswliblayout. The maximum absolute recall difference was 0.0087 for three exemplary datasets: