diff --git a/qwen3_6_scripts/paged_attn.py b/qwen3_6_scripts/paged_attn.py index c3f8492c..c27c615d 100644 --- a/qwen3_6_scripts/paged_attn.py +++ b/qwen3_6_scripts/paged_attn.py @@ -2282,5 +2282,4 @@ class PagedAttention: ) -> None: key_caches = [kv_cache[0] for kv_cache in kv_caches] value_caches = [kv_cache[1] for kv_cache in kv_caches] - import ixformer.functions as ixf_F - ixf_F.vllm_copy_cache(key_caches, value_caches, src_to_dists) + ops.copy_blocks(key_caches, value_caches, src_to_dists) \ No newline at end of file diff --git a/qwen3_6_scripts/patch_ops.sh b/qwen3_6_scripts/patch_ops.sh index c454726e..1ce727fe 100755 --- a/qwen3_6_scripts/patch_ops.sh +++ b/qwen3_6_scripts/patch_ops.sh @@ -247,10 +247,19 @@ INIT_EOF 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/..", + "/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 vllm.ex_engine.python.patch_vllm_ops import apply_all_patches + from ex_engine.python.patch_vllm_ops import apply_all_patches k = apply_all_patches() n += k if k > 0: @@ -259,7 +268,7 @@ def apply(): _logger.warning("ix_startup_patch: bridge patches failed: %s", e) # 2. xllm kernel patches (topk_softmax, norm, activation, rope, cache) try: - from vllm.ex_engine.python.patch_vllm_hot_path import apply as apply_hot + from ex_engine.python.patch_vllm_hot_path import apply as apply_hot k = apply_hot(strict=False) n += k if k > 0: