Fix autograd retention in CUDA graph capture tail hooks (#43854)
This commit is contained in:
@@ -1086,6 +1086,9 @@ class Scheduler(
|
||||
if self.draft_worker is not None:
|
||||
self.draft_worker.init_attention_backends()
|
||||
|
||||
# Not DynamicGradMode: tensors created under inference mode here could not
|
||||
# be written in place by the no_grad disagg event loops.
|
||||
@torch.no_grad()
|
||||
def init_all_cuda_graphs(self):
|
||||
"""Capture cuda graphs for all workers."""
|
||||
self.tp_worker.init_cuda_graphs()
|
||||
|
||||
Reference in New Issue
Block a user