cupy.cuda.nvtx.RangePush#

cupy.cuda.nvtx.RangePush(message, int id_color=-1)#

Starts a nested range.

Ranges are used to describe events over a time span during execution of the application. This is particularly useful when profiling with Nsight Systems to help connect user-specified ranges with CuPy’s internal CUDA-kernels. The duration of a range is defined by the corresponding pair of RangePush() to RangePop() calls, which can be nested.

from cupy.cuda.nvtx import RangePush, RangePop

RangePush("Nested Powers of A")
for i in range(N):
    RangePush("Iter {}: Double A".format(i))
    A = 2*A
    RangePop()
RangePop()
Parameters:
  • message (str) – Name of a range.

  • id_color (int) – ID of color for a range.