Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sparse Pairwise Distances API Updates #1502

Merged

Conversation

divyegala
Copy link
Member

No description provided.

@divyegala divyegala added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 9, 2023
@divyegala divyegala self-assigned this May 9, 2023
@divyegala divyegala requested a review from a team as a code owner May 9, 2023 17:08
@github-actions github-actions bot added the cpp label May 9, 2023
@divyegala divyegala added breaking Breaking change and removed non-breaking Non-breaking change labels May 9, 2023
Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

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

Looking great so far! The new API looks so clean.

cpp/include/raft/sparse/distance/distance.cuh Outdated Show resolved Hide resolved
cpp/include/raft/sparse/distance/distance.cuh Outdated Show resolved Hide resolved
cpp/include/raft/sparse/distance/distance.cuh Outdated Show resolved Hide resolved
cpp/include/raft/sparse/distance/distance.cuh Outdated Show resolved Hide resolved
cpp/include/raft/sparse/distance/distance.cuh Show resolved Hide resolved
static_cast<value_idx>(params.indptr_h.size() - 1),
static_cast<value_idx>(params.indptr_h.size() - 1));

auto x_structure = raft::make_device_compressed_structure_view<value_idx, value_idx, value_idx>(
Copy link
Member

Choose a reason for hiding this comment

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

This is a mouthfull and one of the reasons I opted to shorten it to csr_structure instead of spelling it all out. I wonder if there's another verbiage we can use that might still be consistent with other factory naming conventions but be a little shorter. Not a huge deal, but seeing the function name take up most of this long line of code here is a little concerning.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right, it is a little verbose. I cannot think of another verbiage off the top of my head right now

template <typename DeviceCSRMatrix,
typename ElementType,
typename IndexType,
typename = std::enable_if_t<raft::is_device_csr_sparsity_preserving_v<DeviceCSRMatrix>>>
Copy link
Member

Choose a reason for hiding this comment

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

This should probalby accept sparsity-owning as well, right? The requirement is just that the sparsity has been initialized.

Copy link
Member Author

Choose a reason for hiding this comment

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

It will accept a view obtained from a sparsity owning matrix. I made changes to the meta functions in this PR itself to make that work

@cjnolet cjnolet changed the base branch from branch-23.06 to branch-23.08 June 6, 2023 21:00
@cjnolet
Copy link
Member

cjnolet commented Jul 3, 2023

/merge

@rapids-bot rapids-bot bot merged commit e9d86f1 into rapidsai:branch-23.08 Jul 3, 2023
rapids-bot bot pushed a commit to rapidsai/cuml that referenced this pull request Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change cpp improvement Improvement / enhancement to an existing function
Projects
Development

Successfully merging this pull request may close these issues.

2 participants