-
Notifications
You must be signed in to change notification settings - Fork 197
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
[REVIEW] mdspanify sampleWithoutReplacement #830
Merged
rapids-bot
merged 5 commits into
rapidsai:branch-22.10
from
mhoemmen:mdspanify-sampleWithoutReplacement-1
Sep 23, 2022
Merged
[REVIEW] mdspanify sampleWithoutReplacement #830
rapids-bot
merged 5 commits into
rapidsai:branch-22.10
from
mhoemmen:mdspanify-sampleWithoutReplacement-1
Sep 23, 2022
Conversation
This file contains 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
mhoemmen
added
enhancement
New feature or request
non-breaking
Non-breaking change
labels
Sep 20, 2022
mhoemmen
force-pushed
the
mdspanify-sampleWithoutReplacement-1
branch
from
September 20, 2022 19:03
3ae4e34
to
fc4ab90
Compare
mhoemmen
added
feature request
New feature or request
and removed
enhancement
New feature or request
labels
Sep 20, 2022
cjnolet
requested changes
Sep 20, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great so far. Just a few minor things.
cjnolet
reviewed
Sep 20, 2022
This was referenced Sep 21, 2022
Rename new sampleWithoutReplacement overload to sample_without_replacement. Fix order of parameters: handle, rng, in, out, params. Use RAFT_EXPECTS instead of ASSERT. Make sure that users can pass in std::nullopt explicitly for either or both std::optional parameters. Use "vector" instead of "array" in documentation, use [in], [out], and [inout] as appropriate, and make other documentation improvements. Make error messages more clear.
mhoemmen
force-pushed
the
mdspanify-sampleWithoutReplacement-1
branch
from
September 22, 2022 16:27
2535318
to
80d7aa9
Compare
mhoemmen
force-pushed
the
mdspanify-sampleWithoutReplacement-1
branch
from
September 22, 2022 16:33
80d7aa9
to
6371101
Compare
cjnolet
approved these changes
Sep 23, 2022
rapids-bot bot
pushed a commit
that referenced
this pull request
Sep 23, 2022
I added an overload of `raft::random::permute` that takes device mdspan instead of raw arrays, and `std::optional<mdspan<...>>` for optional output arrays. I also added two overloads that let users pass in `std::nullopt`. I've added a unit test that imitates the existing unit test for the raw-array overloads; it builds and passes. The test ensures that the two `std::nullopt` overloads also compile. I also opportunistically fixed some unrelated existing small build errors that were blocking forward progress. That commit is included in PRs #830 and #833 as well, so if it merges, the change should rebase correctly. Authors: - Mark Hoemmen (https://github.com/mhoemmen) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: #834
@gpucibot merge |
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.
I added an overload of
sampleWithoutReplacement
that takes devicemdspan
instead of raw arrays. The overload usesstd::optional<mdspan<...>>
to express optional mdspan input or output arguments. I've added a unit test that imitates the existing unit test for the raw-array overload; it builds and passes.I also opportunistically fixed some unrelated existing small build errors that were blocking forward progress.