torch.cuda.graph_annotations.clear_kernel_annotations
- torch.cuda.graph_annotations.clear_kernel_annotations() → None
Clear all recorded kernel annotations.
The annotation registry is process-global and accumulates across captures; long-running workloads that capture many graphs should clear it once recorded annotations have been consumed (e.g. after saving them alongside a profiler trace).
Clearing forgets everything recorded so far and revokes recording from every scope opened before the clear: backward hooks that
attached to existing autograd nodes stay on the graph but become inert. Scopes opened after the clear record normally.