From 053dc036b80aba996f1fdc5bca8f76b737dace29 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 17 Aug 2026 14:01:36 +0000 Subject: [PATCH] =?UTF-8?q?[fix]=20prebuilt=20=E7=9A=84=20ix=5Ffull=5Fbrid?= =?UTF-8?q?ge.so=20=E5=9C=A8=E5=AD=90=E8=BF=9B=E7=A8=8B=EF=BC=88=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=20GPU=20=E5=88=9D=E5=A7=8B=E5=8C=96=EF=BC=89=E9=87=8C?= =?UTF-8?q?=E8=A2=AB=20dlopen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qwen3_6_scripts/patch_ops.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/qwen3_6_scripts/patch_ops.sh b/qwen3_6_scripts/patch_ops.sh index 1ce727fe..bd944641 100755 --- a/qwen3_6_scripts/patch_ops.sh +++ b/qwen3_6_scripts/patch_ops.sh @@ -248,16 +248,20 @@ import logging _logger = logging.getLogger("ix_startup_patch") def apply(): import sys, os - # Ensure ex_engine is importable from both locations - for p in ["/workspace/qwen3_6_scripts/ex_engine/..", - "/workspace/qwen3_6_scripts", - "/workspace/ex_engine/..", + # Skip in subprocess inspection (no GPU context → dlopen .so crashes) + try: + import torch + if not torch.cuda.is_available(): + return 0 + except Exception: + return 0 + # Ensure ex_engine is importable + for p in ["/workspace/qwen3_6_scripts", "/workspace"]: rp = os.path.realpath(p) if os.path.isdir(rp) and rp not in sys.path: sys.path.insert(0, rp) n = 0 - # 1. ix_full_bridge patches (rms_norm, silu_and_mul, linear) try: from ex_engine.python.patch_vllm_ops import apply_all_patches k = apply_all_patches() @@ -266,7 +270,6 @@ def apply(): _logger.info("ix_startup_patch: %d bridge patches applied", k) except Exception as e: _logger.warning("ix_startup_patch: bridge patches failed: %s", e) - # 2. xllm kernel patches (topk_softmax, norm, activation, rope, cache) try: from ex_engine.python.patch_vllm_hot_path import apply as apply_hot k = apply_hot(strict=False)