Skip to content

Commit

Permalink
Merge branch 'groupby-apply-caching' of github.com:brandon-b-miller/c…
Browse files Browse the repository at this point in the history
…udf into groupby-apply-caching
  • Loading branch information
brandon-b-miller committed Mar 17, 2023
2 parents 4858af2 + 6866975 commit 197bce6
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 197bce6

Please sign in to comment.