cupy.prof.TimeRangeDecorator#

class cupy.prof.TimeRangeDecorator(message=None, color_id=None, argb_color=None, sync=False)[source]#

Decorator to mark function calls with range in NVIDIA profiler

Decorated function calls are marked as ranges in NVIDIA profiler timeline.

>>> from cupy import prof
>>> @cupy.prof.TimeRangeDecorator()
... def function_to_profile():
...     pass
Parameters:
  • message (str) – Name of a range, default use func.__name__.

  • color_id – range color ID

  • argb_color – range color in ARGB (e.g. 0xFF00FF00 for green)

  • sync (bool) – If True, waits for completion of all outstanding processing on GPU before calling cupy.cuda.nvtx.RangePush() or cupy.cuda.nvtx.RangePop()

Warning

This decorator is deprecated. Please use cupyx.profiler.time_range instead.

Methods

__call__(func)[source]#

Call self as a function.

__enter__()[source]#
__exit__(exc_type, exc_value, traceback)[source]#
__eq__(value, /)#

Return self==value.

__ne__(value, /)#

Return self!=value.

__lt__(value, /)#

Return self<value.

__le__(value, /)#

Return self<=value.

__gt__(value, /)#

Return self>value.

__ge__(value, /)#

Return self>=value.