-
Notifications
You must be signed in to change notification settings - Fork 920
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
Expose stream-ordering in scalar and avro APIs #17766
base: branch-25.02
Are you sure you want to change the base?
Conversation
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. |
*/ | ||
explicit operator value_type() const; | ||
T get_value(rmm::cuda_stream_view stream = cudf::get_default_stream()) const; |
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.
RMM just calls this value
. We often try to avoid “get” in our function names.
T get_value(rmm::cuda_stream_view stream = cudf::get_default_stream()) const; | |
T value(rmm::cuda_stream_view stream = cudf::get_default_stream()) const; |
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.
Wait, doesn’t value
already exist just below here? We may not need get_value
at all. Maybe we just need to delete the conversion operator since it does not take a stream.
*/ | ||
explicit operator value_type() const; | ||
T get_value(rmm::cuda_stream_view stream = cudf::get_default_stream()) const; |
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.
Maybe we should delete this. There are already value
and fixed_point_value
functions.
*/ | ||
explicit operator std::string() const; | ||
std::string get_value(rmm::cuda_stream_view stream = cudf::get_default_stream()) const; |
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.
Same, remove this.
@@ -81,7 +81,7 @@ void ASSERT_BINOP(cudf::column_view const& out, | |||
TypeOp&& op, | |||
ValueComparator const& value_comparator = ValueComparator()) | |||
{ | |||
auto lhs_h = static_cast<ScalarType const&>(lhs).operator TypeLhs(); | |||
auto lhs_h = static_cast<ScalarType const&>(lhs).get_value(cudf::get_default_stream()); |
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.
Please refactor the tests like this:
auto lhs_h = static_cast<ScalarType const&>(lhs).get_value(cudf::get_default_stream()); | |
auto lhs_h = static_cast<ScalarType const&>(lhs).value(cudf::get_default_stream()); |
Description
Contributes to #13744
Replaces conversion operators in derived classes of
cudf::scalar
with stream-orderedget_value(stream)
member function.Adds stream parameter to
cudf::io::read_avro
Checklist