torch.cuda.graphs.register_graph_replay_start_hook
- torch.cuda.graphs.register_graph_replay_start_hook(fn)
Register a hook run with each CUDA graph at the start of every replay, just before it is launched. Returns a RemovableHandle; call
.remove()to unregister.