warp.cuda_profiler_start#

warp.cuda_profiler_start(device=None)[source]#

Begin CUDA profiler data collection.

This is equivalent to the driver API cuProfilerStart and operates on the CUDA context of device (the current device by default) rather than process-wide. Configure Nsight Systems with --capture-range=cudaProfilerApi or Nsight Compute with --profile-from-start off to restrict data collection to the selected region. The attached profiler and its configuration determine which activity is collected, including CUDA API calls, allocations, transfers, kernels, and synchronization.

Example

warp.cuda_profiler_start()
run_workload()
warp.cuda_profiler_stop()

Has no effect on CPU-only builds or when device is not a CUDA device. Profiler control is not reference-counted, so nested or overlapping start/stop calls on the same context are not tracked—each call maps directly to the underlying CUDA call.

Parameters:

device (Device | str | None) – Device whose CUDA context profiling is started for.