torch.cuda.graphs.register_graph_destroy_hook
- torch.cuda.graphs.register_graph_destroy_hook(fn)
Register
fn(exec_ids)to run when a CUDA graph is destroyed. Returns a handle whoseremove()unregisters it.- Return type:
RemovableHandle
Register fn(exec_ids) to run when a CUDA graph is destroyed. Returns a handle whose
remove() unregisters it.
RemovableHandle