Skip to content

Refactor Vamana TUs to use vamana_matrix.json - #2692

Open
aamijar wants to merge 6 commits into
NVIDIA:mainfrom
aamijar:vamana-inst-matrix
Open

aamijar wants to merge 6 commits into
NVIDIA:mainfrom
aamijar:vamana-inst-matrix

Conversation

@aamijar

@aamijar aamijar commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Use new instantiation TU architecture for Vamana instantiations introduced in #1984. Previously vamana was maintaining separate .cu files for each type instead of using the _matrix.json to generate at build time.

@aamijar
aamijar requested review from a team as code owners September 24, 2026 20:35
@aamijar aamijar changed the title Refactor Vamana TUs to use vamana_matrix.json Refactor Vamana TUs to use vamana_matrix.json Sep 24, 2026
const index<T, IdxT>& index_)
const index<T, IdxT>& index_,
bool include_dataset = true,
bool sector_aligned = false)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Found this bug while I was at it too. The template wrapper was stale and didn't have last two arguments.

@aamijar aamijar self-assigned this Sep 24, 2026
@aamijar aamijar added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Sep 24, 2026
@aamijar aamijar moved this to In Progress in Unstructured Data Processing Sep 24, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuvs/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: f2eb7184-b177-499e-90d6-7fee11d1da7a
📥 Commits

Reviewing files that changed from the base of the PR and between a651ecb and 06210e5.

📒 Files selected for processing: 15
  • cpp/CMakeLists.txt
  • cpp/src/neighbors/vamana.cuh
  • cpp/src/neighbors/vamana_build_float.cu
  • cpp/src/neighbors/vamana_build_half.cu
  • cpp/src/neighbors/vamana_build_inst.cu.in
  • cpp/src/neighbors/vamana_build_int8.cu
  • cpp/src/neighbors/vamana_build_uint8.cu
  • cpp/src/neighbors/vamana_codebooks.cu
  • cpp/src/neighbors/vamana_matrix.json
  • cpp/src/neighbors/vamana_serialize.cuh
  • cpp/src/neighbors/vamana_serialize_float.cu
  • cpp/src/neighbors/vamana_serialize_half.cu
  • cpp/src/neighbors/vamana_serialize_inst.cu.in
  • cpp/src/neighbors/vamana_serialize_int8.cu
  • cpp/src/neighbors/vamana_serialize_uint8.cu
💤 Files with no reviewable changes: 10
  • cpp/src/neighbors/vamana_serialize_half.cu
  • cpp/src/neighbors/vamana_serialize_uint8.cu
  • cpp/src/neighbors/vamana_serialize.cuh
  • cpp/src/neighbors/vamana_build_half.cu
  • cpp/src/neighbors/vamana_codebooks.cu
  • cpp/src/neighbors/vamana_build_uint8.cu
  • cpp/src/neighbors/vamana_serialize_float.cu
  • cpp/src/neighbors/vamana_serialize_int8.cu
  • cpp/src/neighbors/vamana_build_int8.cu
  • cpp/src/neighbors/vamana_build_float.cu

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Summary

Summary by CodeRabbit

  • New Features
    • Vamana index serialization now lets you choose whether to include the dataset and whether to use sector-aligned output. By default, serialization includes the dataset and does not use sector alignment, preserving existing behavior. These options give you more control over the contents and layout of serialized index files.

Vamana build and serialization instantiations now use generated sources configured for float, half, int8_t, and uint8_t. The public serialization wrapper forwards dataset-inclusion and sector-alignment options.

Changes: Vamana instantiations

Layer / File(s) Summary
Configure generated Vamana sources
cpp/src/neighbors/vamana_matrix.json, cpp/CMakeLists.txt
A data-type matrix and CMake configuration generate Vamana build and serialization instantiation files and include them in cuvs_objs.
Generate Vamana build overloads
cpp/src/neighbors/vamana_build_inst.cu.in, cpp/src/neighbors/vamana_build_*.cu
A build template provides host- and device-matrix overloads for configured data types. The prior type-specific build sources are removed.
Wire Vamana serialization options
cpp/src/neighbors/vamana.cuh, cpp/src/neighbors/vamana_serialize_inst.cu.in, cpp/src/neighbors/vamana_serialize*
The public serializer forwards dataset-inclusion and sector-alignment options. A configured wrapper replaces the prior type-specific serialization instantiations.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Refactor

Suggested reviewers: divyegala

Merge Risk: ⚪ Minimal · up to 06210

No actionable merge-blocking issue is established; the change is ready for normal build and test checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: refactoring Vamana translation units to use vamana_matrix.json.
Description check Passed The description directly explains the move from separate type-specific .cu files to build-time generation through the matrix configuration.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

1 participant