# tensorplay.cuda.nvtx API Source: https://www.tensorplay.cn/docs/api/tensorplay.cuda.nvtx.html ## Functions 6 [#](#api-tensorplay.cuda.nvtx.mark) ### mark function[Full reference ↗](/docs/generated/tensorplay.cuda.nvtx.mark.html) ```python tensorplay.cuda.nvtx.mark(msg) ``` Describe an instantaneous event that occurred at some point. Parameters: msg ([str](https://docs.python.org/3/builtins/stdtypes.html#str)) – ASCII message to associate with the event. [#](#api-tensorplay.cuda.nvtx.range_end) ### range_end function[Full reference ↗](/docs/generated/tensorplay.cuda.nvtx.range_end.html) ```python tensorplay.cuda.nvtx.range_end(range_id) → None ``` Mark the end of a range for a given range_id. Parameters: range_id ([int](https://docs.python.org/3/builtins/functions.html#int)) – a unique handle for the start range. [#](#api-tensorplay.cuda.nvtx.range_pop) ### range_pop function[Full reference ↗](/docs/generated/tensorplay.cuda.nvtx.range_pop.html) ```python tensorplay.cuda.nvtx.range_pop() ``` Pop a range off of a stack of nested range spans. Returns the zero-based depth of the range that is ended. [#](#api-tensorplay.cuda.nvtx.range_push) ### range_push function[Full reference ↗](/docs/generated/tensorplay.cuda.nvtx.range_push.html) ```python tensorplay.cuda.nvtx.range_push(msg) ``` Push a range onto a stack of nested range span. Returns zero-based depth of the range that is started. Parameters: msg ([str](https://docs.python.org/3/builtins/stdtypes.html#str)) – ASCII message to associate with range [#](#api-tensorplay.cuda.nvtx.range_start) ### range_start function[Full reference ↗](/docs/generated/tensorplay.cuda.nvtx.range_start.html) ```python tensorplay.cuda.nvtx.range_start(msg) → int ``` Mark the start of a range with string message. It returns a unique handle for this range to pass to the corresponding call to rangeEnd(). Returns: A range handle (uint64_t) that can be passed to range_end(). Parameters: msg ([str](https://docs.python.org/3/builtins/stdtypes.html#str)) – ASCII message to associate with the range. [#](#api-tensorplay.cuda.nvtx.range) ### range function[Full reference ↗](/docs/generated/tensorplay.cuda.nvtx.range.html) ```python tensorplay.cuda.nvtx.range(msg, *args, **kwargs) ``` Context manager / decorator that pushes an NVTX range at the beginning of its scope, and pops it at the end. If extra arguments are given, they are passed as arguments to msg.format(). Parameters: msg ([str](https://docs.python.org/3/builtins/stdtypes.html#str)) – message to associate with the range