From e1870880c5c9cbfbc61824f7c69614569f22e16f Mon Sep 17 00:00:00 2001 From: root Date: Tue, 18 Aug 2026 17:40:53 +0000 Subject: [PATCH] [fix ]build baseline4 --- qwen3_6_scripts/paged_attn.py | 6 ++++- qwen3_6_scripts/patch_corex_swap_blocks.py | 29 ---------------------- qwen3_6_scripts/patch_ops.sh | 2 ++ 3 files changed, 7 insertions(+), 30 deletions(-) diff --git a/qwen3_6_scripts/paged_attn.py b/qwen3_6_scripts/paged_attn.py index 693c6a7b..23118933 100644 --- a/qwen3_6_scripts/paged_attn.py +++ b/qwen3_6_scripts/paged_attn.py @@ -2292,4 +2292,8 @@ 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] - ops.copy_blocks(key_caches, value_caches, src_to_dists) \ No newline at end of file + # BI100 CoreX 3.2.3: ixformer exposes vllm_copy_blocks, not + # copy_blocks. Call the vendor symbol directly instead of going + # through ops.copy_blocks (which hits the missing name). + import ixformer.functions as _ixf + _ixf.vllm_copy_blocks(key_caches, value_caches, src_to_dists) \ No newline at end of file diff --git a/qwen3_6_scripts/patch_corex_swap_blocks.py b/qwen3_6_scripts/patch_corex_swap_blocks.py index 888fa9ea..03f9471a 100644 --- a/qwen3_6_scripts/patch_corex_swap_blocks.py +++ b/qwen3_6_scripts/patch_corex_swap_blocks.py @@ -62,33 +62,4 @@ replace_once( COMPATIBLE_BLOCK, required=True, already_contains="BI100 CoreX 3.2.3 exposes vllm_swap_blocks", -) - -# ---------- copy_blocks: same naming mismatch ---------- -COPY_CLEAN = """\ -def copy_blocks(key_caches: List[torch.Tensor], - value_caches: List[torch.Tensor], - block_mapping: torch.Tensor) -> None: - ixf_F.copy_blocks(key_caches, value_caches, block_mapping) -""" - -COPY_COMPAT = """\ -def copy_blocks(key_caches: List[torch.Tensor], - value_caches: List[torch.Tensor], - block_mapping: torch.Tensor) -> None: - # BI100 CoreX 3.2.3 exposes vllm_copy_blocks, not copy_blocks. - _fn = getattr(ixf_F, "copy_blocks", None) or getattr( - ixf_F, "vllm_copy_blocks", None) - if _fn is None: - raise RuntimeError( - "ixformer exposes neither copy_blocks nor vllm_copy_blocks") - _fn(key_caches, value_caches, block_mapping) -""" - -replace_once( - CUSTOM_OPS, - COPY_CLEAN, - COPY_COMPAT, - required=True, - already_contains="BI100 CoreX 3.2.3 exposes vllm_copy_blocks", ) \ No newline at end of file diff --git a/qwen3_6_scripts/patch_ops.sh b/qwen3_6_scripts/patch_ops.sh index 7d277766..6e5f5125 100755 --- a/qwen3_6_scripts/patch_ops.sh +++ b/qwen3_6_scripts/patch_ops.sh @@ -460,3 +460,5 @@ python3 ./verify_dlopen_chain.py --vllm-root "${VLLM_ROOT}" || { build_stage "patch script completed" + +