forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hardware][Intel GPU] Add intel GPU pipeline parallel support. (vllm-…
- Loading branch information
1 parent
546cf34
commit b166414
Showing
6 changed files
with
82 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import vllm.envs as envs | ||
from vllm.executor.multiproc_gpu_executor import ( | ||
MultiprocessingGPUExecutor, MultiprocessingGPUExecutorAsync) | ||
from vllm.executor.xpu_executor import XPUExecutor | ||
from vllm.logger import init_logger | ||
from vllm.utils import make_async | ||
|
||
logger = init_logger(__name__) | ||
|
||
|
||
class MultiprocessingXPUExecutor(MultiprocessingGPUExecutor, XPUExecutor): | ||
"""Python multiprocessing-based multi-XPU executor""" | ||
|
||
def _check_executor_parameters(self): | ||
mp_method = envs.VLLM_WORKER_MULTIPROC_METHOD | ||
if mp_method != "spawn": | ||
raise RuntimeError( | ||
"XPU multiprocess executor only support spawn as mp method") | ||
|
||
|
||
class MultiprocessingXPUExecutorAsync(MultiprocessingXPUExecutor, | ||
MultiprocessingGPUExecutorAsync): | ||
|
||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
self.driver_exec_model = make_async(self.driver_worker.execute_model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters