Is your feature request related to a problem? Please describe.
Creating a column_device_view from a column_view with an unknown null count results in the null count being computed, which can impact performance if the null count is not used. In many cases, the null count is used in host code to dispatch to different kernels for nullable and non-nullable columns, which doesn't require a device view. Within the cudf codebase, each instance where I found the column_device_view null count being accessed, there is a corresponding column_view within the same scope that could be used to query the null count instead.
For example:
d_column.null_count() here could be replaced with strings.null_count():
|
auto chars_column = create_chars_child_column( strings_count, d_column.null_count(), bytes, mr, stream ); |
p_left_dcol->has_nulls() here could be replaced with left_col.has_nulls():
|
if (p_left_dcol->has_nulls()) { |
)
Describe the solution you'd like
Remove the _null_count, null_count(), and has_nulls() members from column_device_view. Replace instances of these methods with the corresponding column_view methods.
Describe alternatives you've considered
When constructing the column_device_view from a column with unknown null count, the unknown null count could be propagated to the device view rather than triggering the null count to be computed.
Is your feature request related to a problem? Please describe.
Creating a
column_device_viewfrom acolumn_viewwith an unknown null count results in the null count being computed, which can impact performance if the null count is not used. In many cases, the null count is used in host code to dispatch to different kernels for nullable and non-nullable columns, which doesn't require a device view. Within the cudf codebase, each instance where I found thecolumn_device_viewnull count being accessed, there is a correspondingcolumn_viewwithin the same scope that could be used to query the null count instead.For example:
d_column.null_count()here could be replaced withstrings.null_count():cudf/cpp/src/strings/strip.cu
Line 146 in eac284d
p_left_dcol->has_nulls()here could be replaced withleft_col.has_nulls():cudf/cpp/src/merge/merge.cu
Line 120 in eac284d
Describe the solution you'd like
Remove the
_null_count,null_count(), andhas_nulls()members fromcolumn_device_view. Replace instances of these methods with the correspondingcolumn_viewmethods.Describe alternatives you've considered
When constructing the
column_device_viewfrom a column with unknown null count, the unknown null count could be propagated to the device view rather than triggering the null count to be computed.