Skip to content

Commit 52abd47

Browse files
authored
[Bugfix][SHM] Use writer lock by default and remove redundant env (#4117)
### What this PR does / why we need it? This PR aims to remove env introduced by #3988 and use lock by default. As described in vllm-project/vllm#27858, we have tested the writer lock method in various scenarios and the performance is almost unaffected. Therefore, we believe that it would be safe to enable the lock by default and remove the redundant env `SHM_BARRIER` now. After discussion, we decide to preserve env and set it as true by default. ### Does this PR introduce _any_ user-facing change? `SHM_BARRIER` is set as true by default. ### How was this patch tested? by ci --------- Signed-off-by: Zetong Li <slippersss@126.com>
1 parent 76d0ba4 commit 52abd47

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

vllm_ascend/patch/platform/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"EXPERT_MAP_RECORD", "false") == "true":
2626
import vllm_ascend.patch.platform.patch_multiproc_executor # noqa
2727

28-
if os.getenv("SHM_BARRIER", "false") == "true":
28+
if os.getenv("SHM_BARRIER", "true") == "true":
2929
import vllm_ascend.patch.platform.patch_core # noqa
3030
import vllm_ascend.patch.platform.patch_message_queue # noqa

vllm_ascend/patch/worker/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# limitations under the License.
1616
#
1717

18+
import os
19+
1820
from vllm.triton_utils import HAS_TRITON
1921

2022
if HAS_TRITON:
@@ -29,4 +31,7 @@
2931
import vllm_ascend.patch.worker.patch_multimodal_merge # noqa
3032
import vllm_ascend.patch.worker.patch_minicpm # noqa
3133
import vllm_ascend.patch.worker.patch_deepseek_mtp # noqa
32-
import vllm_ascend.patch.worker.patch_attention_layer # noqa
34+
import vllm_ascend.patch.worker.patch_attention_layer # noqa
35+
36+
if os.getenv("SHM_BARRIER", "true") == "true":
37+
import vllm_ascend.patch.platform.patch_message_queue # noqa

0 commit comments

Comments
 (0)