Repository navigation
Harden parallel HNSW graph processing - #9
Merged
Merged
Conversation
Add independently configurable graph workers, bounded shared execution, physical-memory-aware copy admission, and byte-bounded serialization waves. Cover persistence, lifecycle, failure, concurrency, and high-degree serialization behavior.
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.
Important
This draft stacks the review follow-ups for NVIDIA/cuvs#2653 on its existing head branch. Keeping
post-ingest-hnsw-parallelismas the base preserves the upstream PR's review history. This supersedes fork-only staging PR #8.Base and scope
nvzm123:post-ingest-hnsw-parallelisme979614fa1bd727d0cf733defe483d5c9d53c51dnvzm123:zackm_pr2653_review_fixes03d28e150d765c66bb7a395dc64482ba93d438ffThe base includes the current PR NVIDIA#2476 head (
6c175502a) and NVIDIA/cuvsmainthroughee29a67c9. The restack preserves PR NVIDIA#2476's ownership and cleanup fixes andmain's CAGRA parameter-boundary validation.Summary
This PR hardens the two CPU-side stages after cuVS builds an accelerated-HNSW graph:
graphThreadsconcurrency for graph materialization and serialization. Native cuVS concurrency remains controlled bywriterThreads; both default to one for accelerated HNSW.InfoStream.The established public serial constructor and
writeGraph(...)entry point remain available. New threaded overloads are package-private.Coverage
The replacement tests cover:
writerThreads/graphThreadsindependence and current CAGRA boundary validationThe three earlier
TestWriterThreads*classes were replaced because their premise coupled graph processing towriterThreads. Their useful coverage is retained and expanded under the independentgraphThreadscontract.Validation
Final local validation used an NVIDIA A10G and the matching 26.12 Java/native stack:
mvn clean verify: 386 outcomes, 356 passed, 30 skipped, 0 failures, 0 errorsbash -n ci/test_lucene.sh ci/test_lucene_prebuilt.sh: passedgit diff --check: passedNon-failing diagnostics were the existing small-dataset graph-parameter clamp messages, JVM Vector/native-access notices, randomized-testing waits for the intentionally expiring graph workers, the Maven Javadoc-plugin warning, GDS unavailability with KvikIO fallback, and Fern's existing unauthenticated-redirect and light-mode contrast warnings.
The shared worker bound is directly tested with concurrent callers. A real concurrent multi-segment flush E2E run has not yet been performed.
Historical benchmark
At PR #8 commit
83a426b8d, a Deep1B 10M one-segment comparison reduced mean end-to-end indexing time from 36.497 s (graphThreads=1) to 28.647 s (graphThreads=16), and commit/build time from 31.509 s to 23.584 s. That benchmark predates the final observability/test changes and the latestmainsynchronization and was not rerun on this head.