[Core] Pipeline parallel with Ray ADAG (#6837)
Support pipeline-parallelism with Ray accelerated DAG. Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
This commit is contained in:
@@ -285,7 +285,9 @@ class LocalOrDistributedWorkerBase(WorkerBase):
|
||||
return output
|
||||
|
||||
def _execute_model_spmd(
|
||||
self, execute_model_req: ExecuteModelRequest
|
||||
self,
|
||||
execute_model_req: ExecuteModelRequest,
|
||||
intermediate_tensors: Optional[IntermediateTensors] = None
|
||||
) -> Optional[List[SamplerOutput]]:
|
||||
"""
|
||||
Execute model in Single Program Multiple Data (SPMD) fashion.
|
||||
@@ -309,7 +311,7 @@ class LocalOrDistributedWorkerBase(WorkerBase):
|
||||
|
||||
return self.model_runner.execute_model(
|
||||
model_input, self.kv_cache[worker_input.virtual_engine]
|
||||
if self.kv_cache is not None else None)
|
||||
if self.kv_cache is not None else None, intermediate_tensors)
|
||||
|
||||
|
||||
class WorkerWrapperBase:
|
||||
|
||||
Reference in New Issue
Block a user