Fix GPU and Java-heap OOM when building large vector indexes - #2476
Draft
nvzm123 wants to merge 1 commit into
Draft
Fix GPU and Java-heap OOM when building large vector indexes#2476nvzm123 wants to merge 1 commit into
nvzm123 wants to merge 1 commit into
Conversation
Signed-off-by: Zack Meeks <zmeeks@nvidia.com>
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.
Summary
This ports NVIDIA/cuvs-lucene#173 into
java/cuvs-lucenefollowing the move into the cuVS monorepo.It addresses two memory-pressure problems when building accelerated HNSW indexes over large datasets:
List<float[]>copy on the Java heap.The change also consolidates the HNSW graph and field-writing paths around
CuVSMatrix, removes redundant size/resource parameters, and derives quantized-vector byte width from the matrix so binary and scalar quantization use the correct width.The original work superseded NVIDIA/cuvs-lucene#141. The related increase of
MAX_HNSW_LAYERSto 99 is already present on the current monorepomainand is therefore not part of this diff.Validation status
Fresh port-only structural checks:
cd java/cuvs-lucene && mvn -q -DskipTests compile— passedcd java/cuvs-lucene && mvn -q spotless:check— passedThese commands compile and check formatting; they do not constitute behavioral or GPU validation.
The source PR historically reported local passes for:
TestMerge, includingtestLargeScaleMergewith-DlargeScale=trueTestCuVSVectorsFormatTestLucene99AcceleratedHNSWVectorsFormatTestQuantizedVectorsFormatsThose results predate this port and are not validation of the current branch. The original PR's final standalone-repository CI run was not green, so the relevant Java/GPU suites must be rerun from
java/cuvs-lucene. We also need combined validation with PR #2475, including its full PyLucene GPU end-to-end suite.The source PR also recorded an intermittent, seed-dependent
TestLucene99AcceleratedHNSWVectorsFormat.testCheckIntegrityReadsAllBytesfailure during full-suite randomized graph testing. It passed in isolation and reportedly occurred at a similar rate on the source base branch. This historical observation has not yet been re-evaluated in the monorepo.