-
Notifications
You must be signed in to change notification settings - Fork 915
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
[FEA] Stream-preserving constructors for scalar class and its derived classes #14333
Comments
I believe #14354 will address this |
#14354 replaces all such occurences but it does not remove the default argument. |
These are public interfaces and all public APIs currently have defaulted stream parameters. |
Right. We can't remove stream from scalar methods or any other public interfaces. cudf data types does not store streams (scalar, column, table, groupby). https://docs.rapids.ai/api/libcudf/nightly/developer_guide (libcudf API and Implementation → Streams). streams are passed to libcudf APIs. So, storing them inside data structure doesn't align well, and also execution should use stream (including memory allocation), IMO, data structures should not hold streams (although rmm differs from this). The constructors are called with streams because memory allocation and copy will execute on streams. |
It's made clear than the default arguments on public APIs can't be removed without a breaking change.
Does this mean to propose storing streams inside scalar class? |
Could we take a step back here and ask why
is happening at all? cudf APIs are generally designed so that APIs should accept views rather than values. We don't have a IOW I don't know if there's a good reason for the copy constructor to not be explicit in the long run. I made the same point in a comment on the corresponding PR as well. |
Is your feature request related to a problem? Please describe.
When the class constructor is implicitly called (when the object is passed-by-value, for instance), the constructor is called with the default stream, and not the CUDA stream passed by the user on which the algorithm is running.
string_scalar(string_scalar const& other, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
Describe the solution you'd like
Consider requiring stream to be passed to constructor by making it a non-default argument.
string_scalar(string_scalar const& other, rmm::cuda_stream_view stream , rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
Describe alternatives you've considered
None
Additional context
None
The text was updated successfully, but these errors were encountered: