warp.ScopedTimer#
- class warp.ScopedTimer(
- name,
- active=True,
- print=True,
- detailed=False,
- dict=None,
- use_nvtx=False,
- color='rapids',
- synchronize=False,
- cuda_filter=0,
- report_func=None,
- skip_tape=False,
- Parameters:
- __init__(
- name,
- active=True,
- print=True,
- detailed=False,
- dict=None,
- use_nvtx=False,
- color='rapids',
- synchronize=False,
- cuda_filter=0,
- report_func=None,
- skip_tape=False,
Context manager object for a timer
- Parameters:
name (str) – Name of timer
active (bool) – Enables this timer
print (bool) – At context manager exit, print elapsed time to
sys.stdoutdetailed (bool) – Collects additional profiling data using cProfile and calls
print_stats()at context exitdict (dict[str, list[float]] | None) – A dictionary of lists to which the elapsed time will be appended using
nameas a keyuse_nvtx (bool) – If true, timing functionality is replaced by an NVTX range
color (int | str) – ARGB value (e.g. 0x00FFFF) or color name (e.g. ‘cyan’) associated with the NVTX range
synchronize (bool) – Synchronize the CPU thread with any outstanding CUDA work to return accurate GPU timings
cuda_filter (int) – Filter flags for CUDA activity timing, e.g.
warp.TIMING_KERNELorwarp.TIMING_ALLreport_func (Callable[[list[TimingResult], str], None] | None) – A callback function to print the activity report. If
None,wp.timing_print()will be used.skip_tape (bool) – If true, the timer will not be recorded in the tape
- timing_results#
The list of activity timing results, if collection was requested using
cuda_filter- Type:
Methods
__init__(name[, active, print, detailed, ...])Context manager object for a timer
Attributes
- enabled = True#