Rate this Page

torch.cuda.graphs.register_graph_destroy_hook#

torch.cuda.graphs.register_graph_destroy_hook(fn)[source]#

Register fn(exec_ids) to run when a CUDA graph is destroyed. Returns a handle whose remove() unregisters it.

Return type:

RemovableHandle