Skip to content

Commit

Permalink
fix error in python3.8. (#2646)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinerzhou authored Oct 24, 2024
1 parent eaa4e6f commit d00e470
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lmdeploy/pytorch/engine/model_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,8 @@ def _start_tp_process(proc_id: int,
timeout=timedelta(days=35600))
dist_ctx = DistContext(rank=rank, world_size=world_size)
torch.cuda.set_device(rank)
with (get_dist_manager().context(dist_ctx),
get_device_manager().context(device_context),
torch.inference_mode()):
with get_dist_manager().context(dist_ctx), get_device_manager(
).context(device_context), torch.inference_mode():
args = args or tuple()
kwargs = kwargs or dict()
func(rank, *args, **kwargs)
Expand Down

0 comments on commit d00e470

Please sign in to comment.