Skip to content

[FEA] Standardize KMeans Instantiations#1996

Draft
tarang-jain wants to merge 10 commits intorapidsai:mainfrom
tarang-jain:int64-extents
Draft

[FEA] Standardize KMeans Instantiations#1996
tarang-jain wants to merge 10 commits intorapidsai:mainfrom
tarang-jain:int64-extents

Conversation

@tarang-jain
Copy link
Copy Markdown
Contributor

Simplify and standardize the kmeans public API types:

  • Extents: Remove all int (int32) extent overloads; only int64_t remains. This halves the number of template instantiations
  • Labels: All predict and fit_predict outputs use uint32_t labels (cluster IDs always fit in 32 bits since n_clusters is int). Removes redundant int and int64_t label overloads from balanced kmeans.
  • n_iter: Changed from host_scalar_view<IndexT> to host_scalar_view<int> throughout — iteration count is always small.

These changes are made in the detail templates themselves, so the .cu wrappers are clean pass-throughs with no temporary buffers or type conversions.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Apr 7, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@tarang-jain tarang-jain added breaking Introduces a breaking change improvement Improves an existing functionality labels Apr 7, 2026
@tarang-jain tarang-jain self-assigned this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Introduces a breaking change improvement Improves an existing functionality

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant