[v1] torchrun compatibility (#13642)
Signed-off-by: youkaichao <youkaichao@gmail.com>
This commit is contained in:
@@ -112,10 +112,12 @@ try:
|
||||
torch.cuda.set_device(self.worker.device)
|
||||
self.compiled_dag_cuda_device_set = True
|
||||
|
||||
def execute_model(
|
||||
def execute_model_ray(
|
||||
self,
|
||||
scheduler_output: "SchedulerOutput",
|
||||
) -> "ModelRunnerOutput":
|
||||
# this method is used to compile ray CG,
|
||||
# and it needs a special logic of self.setup_device_if_necessary()
|
||||
self.setup_device_if_necessary()
|
||||
assert self.worker is not None, "Worker is not initialized"
|
||||
if isinstance(scheduler_output, tuple):
|
||||
|
||||
Reference in New Issue
Block a user