Skip to content

Commit

Permalink
Update python/cudf/cudf/core/udf/groupby_utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: Bradley Dice <[email protected]>
  • Loading branch information
brandon-b-miller and bdice authored Mar 15, 2023
1 parent e41b72c commit 6866975
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions python/cudf/cudf/core/udf/groupby_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,11 @@ def jit_groupby_apply(offsets, grouped_values, function, *args):
ngroups = len(offsets) - 1

cache_key = _generate_cache_key(grouped_values, function)
if precompiled.get(cache_key) is not None:
kernel, return_type = precompiled[cache_key]
else:
kernel, return_type = _get_groupby_apply_kernel(
if cache_key not in precompiled:
precompiled[cache_key] = _get_groupby_apply_kernel(
grouped_values, function, args
)
precompiled[cache_key] = (kernel, return_type)
kernel, return_type = precompiled[cache_key]

return_type = numpy_support.as_dtype(return_type)
output = cudf.core.column.column_empty(ngroups, dtype=return_type)
Expand Down

0 comments on commit 6866975

Please sign in to comment.