Skip to content

Commit

Permalink
Fix a mask data corruption in UDF (rapidsai#12647)
Browse files Browse the repository at this point in the history
This PR fixes a mask data corruption issue encountered while working on rapidsai#12619.

`column_empty` actually returns un-initialized values, but we would want a fully initialized mask column here. Hence it is very inconsistent to test for a failure here, which is the reason it has been passing in CI and many of the local builds.

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - https://github.com/brandon-b-miller
  - Ashwin Srinath (https://github.com/shwina)

URL: rapidsai#12647
  • Loading branch information
galipremsagar authored Jan 30, 2023
1 parent 005d821 commit 663f312
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/cudf/cudf/core/indexed_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,9 @@ def _apply(self, func, kernel_getter, *args, **kwargs):

# Mask and data column preallocated
ans_col = _return_arr_from_dtype(retty, len(self))
ans_mask = cudf.core.column.column_empty(len(self), dtype="bool")
ans_mask = cudf.core.column.full(
size=len(self), fill_value=True, dtype="bool"
)
output_args = [(ans_col, ans_mask), len(self)]
input_args = _get_input_args_from_frame(self)
launch_args = output_args + input_args + list(args)
Expand Down

0 comments on commit 663f312

Please sign in to comment.