@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 084a01fd35
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 20:45 UTC

[Bugfix] [Easy] Fixed a bug in the multiprocessing GPU executor. (#6770)

Anthony Platanios committed Jul 26, 2024 at 00:25 UTC 084a01fd3544557990f8af8af6fd3c1185bae848
1 file changed +4 -2
vllm/executor/multiproc_gpu_executor.py
+4 -2
@@ -1,6 +1,7 @@
1 import asyncio
2 import os
3 import signal
4 +import threading
5 import weakref
6 from functools import partial
7 from typing import Any, List, Optional
@@ -115,8 +116,9 @@ class MultiprocessingGPUExecutor(DistributedGPUExecutor):
116 if executor := ref():
117 executor.shutdown()
118
118 - signal.signal(signal.SIGINT, shutdown)
119 - signal.signal(signal.SIGTERM, shutdown)
119 + if threading.current_thread() is threading.main_thread():
120 + signal.signal(signal.SIGINT, shutdown)
121 + signal.signal(signal.SIGTERM, shutdown)
122
123 self.driver_worker = self._create_worker(
124 distributed_init_method=distributed_init_method)