Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ def capture_one(
if post_warmup_hook is not None:
post_warmup_hook()

# The syncs above order work issued before each warmup, not the last
# warmup's own. A JIT module that finishes loading mid-capture issues
# illegal driver calls on the capturing stream, so drain once more here.
self._device_module.synchronize()
self._tp_group.barrier()

graph = BreakableCUDAGraph(self.deduped_cuda_graph)
captured_fn = (
eager_on_graph(True)(forward_fn) if self._debug_eager else forward_fn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ def capture_one(
self._reuse_output_buffer = self._output_buffer is not None
del warmup_output

# The syncs above order work issued before each warmup, not the last
# warmup's own. A JIT module that finishes loading mid-capture issues
# illegal driver calls on the capturing stream, so drain once more here.
self._device_module.synchronize()
self._tp_group.barrier()

graph = torch.cuda.CUDAGraph()

graph_ctx: Callable[..., AbstractContextManager]
Expand Down
Loading