Skip to content

Add KDE kernel#1915

Open
Intron7 wants to merge 5 commits intorapidsai:mainfrom
Intron7:tiled_kde_kernel
Open

Add KDE kernel#1915
Intron7 wants to merge 5 commits intorapidsai:mainfrom
Intron7:tiled_kde_kernel

Conversation

@Intron7
Copy link
Contributor

@Intron7 Intron7 commented Mar 13, 2026

@cjnolet moved the kernel for KDE from cuml to cuvs. This PR is needed for rapidsai/cuml#7833

@copy-pr-bot
Copy link

copy-pr-bot bot commented Mar 13, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

*/
template <typename T>
void kde_score_samples(raft::resources const& handle,
const T* query,
Copy link
Member

Choose a reason for hiding this comment

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

Can we accept mdspans here instead of raw pointers? That would also simplify the function signatures for the public APIs. Can still expose pointers at the cuml layer for now (for the python layer) if that's easier.

* @param[in] metric_arg Metric parameter (e.g. p for Minkowski; ignored otherwise)
*/
template <typename T>
void kde_score_samples(raft::resources const& handle,
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense just call this "kde" or is there signficant enough post processing being done after calling this?

* These are the smoothing kernels used in KDE — distinct from the dot-product
* kernels (RBF, Polynomial, etc.) in cuvs::distance::kernels used by SVMs.
*/
enum class DensityKernelType : int {
Copy link
Member

Choose a reason for hiding this comment

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

Can we at least consolidate this struct w/ the existing KernelType struct in distance.hpp?

@aamijar aamijar added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Mar 13, 2026
@aamijar
Copy link
Member

aamijar commented Mar 13, 2026

/ok to test 4690f8d

@aamijar
Copy link
Member

aamijar commented Mar 13, 2026

@Intron7, thanks for the PR!
Please run pre-commit to enforce style checks.

@aamijar aamijar changed the title add kde kernel Add KDE kernel Mar 13, 2026
@aamijar
Copy link
Member

aamijar commented Mar 15, 2026

/ok to test 66d923b

@aamijar
Copy link
Member

aamijar commented Mar 18, 2026

/ok to test 8c852d5

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

Development

Successfully merging this pull request may close these issues.

3 participants