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

Fix unary_op docs and add map_offset as an improved version of write_only_unary_op #1149

Merged
merged 14 commits into from
Jan 25, 2023

Conversation

Nyrio
Copy link
Contributor

@Nyrio Nyrio commented Jan 17, 2023

Follows a discussion that we had about write_only_unary_op / writeOnlyUnaryOp.

For consistency and to simplify the use of this primitive, we shouldn't require dereferencing a pointer in the functor.

This new implementation uses thrust::tabulate but we can add our own optimized kernel later if we need.

@Nyrio Nyrio added 3 - Ready for Review improvement Improvement / enhancement to an existing function non-breaking Non-breaking change cpp labels Jan 17, 2023
@Nyrio Nyrio requested a review from a team as a code owner January 17, 2023 15:39
@Nyrio Nyrio requested review from achirkin and cjnolet January 17, 2023 15:39
@Nyrio Nyrio self-assigned this Jan 18, 2023
Copy link
Contributor

@achirkin achirkin left a comment

Choose a reason for hiding this comment

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

Thanks for the long-awaited change! I have some comments regarding the naming though.

cpp/include/raft/core/operators.hpp Outdated Show resolved Hide resolved
cpp/include/raft/linalg/unary_op.cuh Show resolved Hide resolved
cpp/include/raft/linalg/unary_op.cuh Outdated Show resolved Hide resolved
cpp/include/raft/spatial/knn/detail/ivf_pq_build.cuh Outdated Show resolved Hide resolved
Copy link
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

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

Thanks Louis for the PR. From my side it looks good, pre-approving. Please address the open issues raised by Artem.

cpp/include/raft/spatial/knn/detail/ivf_pq_build.cuh Outdated Show resolved Hide resolved
@Nyrio Nyrio changed the title Fix unary_op docs and add index_unary_op as an improved version of write_only_unary_op Fix unary_op docs and add map_offset as an improved version of write_only_unary_op Jan 19, 2023
@Nyrio
Copy link
Contributor Author

Nyrio commented Jan 19, 2023

@achirkin @tfeher I've moved the primitive to map.cuh, renamed it to map_offset, and opened #1157

@cjnolet
Copy link
Member

cjnolet commented Jan 19, 2023

This new implementation uses thrust::tabulate but we can add our own optimized kernel later if we need.

Sorry for being late to this discussion, @Nyrio. Yes I always prefer this option especially when it's an operation that we intend to use frequently because it allows us to centralize the main logic and optimize as needed.

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.

Just a couple minor things but otherwise looks great!

cpp/include/raft/linalg/unary_op.cuh Outdated Show resolved Hide resolved
cpp/include/raft/linalg/unary_op.cuh Show resolved Hide resolved
cpp/include/raft/linalg/map.cuh Show resolved Hide resolved
@Nyrio
Copy link
Contributor Author

Nyrio commented Jan 19, 2023

@cjnolet It could be that Doxygen parses Note: as the command @note, but I think the proper syntax is the latter. Iirc there is a similar thing with TODO: and @todo.

I've changed the documentation as requested.

@Nyrio Nyrio requested review from cjnolet and achirkin January 19, 2023 18:29
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.

LGTM

@cjnolet cjnolet added 4 - Waiting on Reviewer Waiting for reviewer to review or respond and removed 3 - Ready for Review labels Jan 25, 2023
Copy link
Contributor

@achirkin achirkin left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

Codecov Report

Base: 87.99% // Head: 87.99% // No change to project coverage 👍

Coverage data is based on head (21c8588) compared to base (7c12b1e).
Patch has no changes to coverable lines.

Additional details and impacted files
@@              Coverage Diff              @@
##           branch-23.02    #1149   +/-   ##
=============================================
  Coverage         87.99%   87.99%           
=============================================
  Files                21       21           
  Lines               483      483           
=============================================
  Hits                425      425           
  Misses               58       58           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cjnolet
Copy link
Member

cjnolet commented Jan 25, 2023

/merge

@rapids-bot rapids-bot bot merged commit 20a31bd into rapidsai:branch-23.02 Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - Waiting on Reviewer Waiting for reviewer to review or respond cpp improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
Development

Successfully merging this pull request may close these issues.

5 participants