curobo.profiling module¶
Profiling utilities for cuRobo.
Lightweight timing helpers for measuring GPU work. Timer behavior is gated by
curobo.runtime.cuda_event_timers; when disabled, timers are no-ops and return
0.0 with minimal overhead.
Example
from curobo.profiling import CudaEventTimer
timer = CudaEventTimer().start()
# ... GPU work ...
elapsed_seconds = timer.stop()
- class CudaEventTimer¶
Bases:
objectLightweight CUDA event-based timer for accurate GPU timing.
Uses CUDA events instead of CPU time + synchronize for more accurate GPU timing without blocking the entire device.
Example
>>> timer = CudaEventTimer().start() >>> # ... GPU work ... >>> elapsed_seconds = timer.stop()
The timer respects runtime.cuda_event_timers. When disabled, stop() returns 0.0 with minimal overhead.
Initialize the timer.
- __init__()¶
Initialize the timer.
- start()¶
Start the timer by recording a CUDA event.
- Return type:
- Returns:
Self for method chaining.