torch.cuda.graphs.register_graph_capture_end_hook
- torch.cuda.graphs.register_graph_capture_end_hook(fn)
Register a hook run with each CUDA graph when its capture ends, while the captured
cudaGraph_tis still live (seeCUDAGraph.register_capture_end_hook()). Returns a RemovableHandle; callto unregister.