Skip to content

Commit

Permalink
Refactor nvtx annotations in cudf & dask-cudf (#10396)
Browse files Browse the repository at this point in the history
This PR consolidates all `nvtx.annotate` calls using common decorators `cudf_nvtx_annotate` & `dask_cudf_nvtx_annotate` that makes it easier to maintain and annotate APIs.

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

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Benjamin Zaitlen (https://github.com/quasiben)

URL: #10396
  • Loading branch information
galipremsagar authored Mar 9, 2022
1 parent 14bd5f6 commit 70406de
Show file tree
Hide file tree
Showing 17 changed files with 625 additions and 765 deletions.
198 changes: 92 additions & 106 deletions python/cudf/cudf/core/dataframe.py

Large diffs are not rendered by default.

209 changes: 100 additions & 109 deletions python/cudf/cudf/core/frame.py

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions python/cudf/cudf/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from functools import cached_property

import numpy as np
from nvtx import annotate

import cudf
from cudf._lib import groupby as libgroupby
Expand All @@ -18,7 +17,7 @@
from cudf.core.column.column import arange, as_column
from cudf.core.mixins import Reducible, Scannable
from cudf.core.multiindex import MultiIndex
from cudf.utils.utils import GetAttrGetItemMixin
from cudf.utils.utils import GetAttrGetItemMixin, _cudf_nvtx_annotate


# The three functions below return the quantiles [25%, 50%, 75%]
Expand Down Expand Up @@ -207,7 +206,7 @@ def cumcount(self):
def _groupby(self):
return libgroupby.GroupBy(self.grouping.keys, dropna=self._dropna)

@annotate("GROUPBY_AGG", domain="cudf_python")
@_cudf_nvtx_annotate
def agg(self, func):
"""
Apply aggregation(s) to the groups.
Expand Down
Loading

0 comments on commit 70406de

Please sign in to comment.