Skip to content

Commit

Permalink
Make torch TP composable with torch.compile (#2352)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwen2501 authored Dec 5, 2024
1 parent 18ea841 commit d693ec0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions python/sglang/srt/model_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ def _prepare_output_fn(output_layouts, use_local_output, mod, outputs, device_me
)._prepare_output_fn(
output_layouts, use_local_output, mod, outputs, device_mesh
)
# wait for the output to be ready
if isinstance(outputs, AsyncCollectiveTensor):
return outputs.wait()
else:
return outputs
return torch.distributed._functional_collectives.wait_tensor(outputs)


def tensor_parallel(
Expand Down

0 comments on commit d693ec0

Please sign in to comment.