fix: remove ix_moe_bridge — nm -D confirms libixformer.so has NO MoE symbols
真机探测确认: nm -D libixformer.so | grep topk_softmax → 空 ixf_F dir() → 无 vllm_moe_topk_softmax ixf_F dir() → 无 vllm_invoke_fused_moe_kernel ixf_F dir() → 无 vllm_moe_align_block_size _ixformer_torch.so symbols → 仅 cuinfer_gemm 系列, 无 MoE 结论: base 镜像的 MoE 路径: fused_moe.py → _custom_ops.topk_softmax → ixf_F.vllm_moe_topk_softmax → AttributeError → qwen3_5.py 捕获 → fallback to Python expert loop (这是唯一能工作的路径) 修改: 1. _custom_ops.py topk_softmax: 直接 PyTorch softmax+topk, 不尝试 ixf_F (消除 ERROR 日志) 2. 移除 ix_moe_bridge 加载逻辑 (libixformer.so 没有 MoE 符号, 链接会失败) 3. 移除 patch_ops.sh ix_moe_bridge JIT 编译步骤 comp 168 的 0 分根因不是 MoE fallback (所有参赛者都 fallback), 而是我们的自定义 qwen3_5.py 导致 GDN NaN 99.98% + OOM. 上一个 commit 已修复: 条件部署 qwen3_5.py + max_model_len=80000.
This commit is contained in:
@@ -260,37 +260,7 @@ if [ -d "$EX_ENGINE_SRC/python" ]; then
|
||||
echo "[patch_ops] EX Engine Python package deployed to $EX_PY_DST"
|
||||
fi
|
||||
|
||||
# 7a. JIT compile ix_moe_bridge.cpp → .so (bridge to ixformer::infer C++ API)
|
||||
# This is CRITICAL: topk_softmax, group_gemm, etc. are ONLY accessible via C++
|
||||
IX_MOE_BRIDGE_CPP="/workspace/ex_engine/csrc/ix_moe_bridge.cpp"
|
||||
if [ -f "$IX_MOE_BRIDGE_CPP" ]; then
|
||||
echo "[patch_ops] Pre-compiling ix_moe_bridge.cpp (ixformer C++ bridge)..."
|
||||
python3 -c "
|
||||
import torch
|
||||
from torch.utils.cpp_extension import load
|
||||
try:
|
||||
bridge = load(
|
||||
name='ix_moe_bridge',
|
||||
sources=['$IX_MOE_BRIDGE_CPP'],
|
||||
extra_include_paths=['/usr/local/corex/include'],
|
||||
extra_ldflags=[
|
||||
'-L/usr/local/corex/lib64',
|
||||
'-L/usr/local/corex/lib64/python3/dist-packages/ixformer',
|
||||
'-lixformer',
|
||||
'-Wl,-rpath,/usr/local/corex/lib64/python3/dist-packages/ixformer',
|
||||
],
|
||||
verbose=True,
|
||||
)
|
||||
print('[patch_ops] ix_moe_bridge compiled successfully')
|
||||
# Test basic function availability
|
||||
print(f'[patch_ops] Bridge functions: {[x for x in dir(bridge) if not x.startswith(\"_\")]}')
|
||||
except Exception as e:
|
||||
print(f'[patch_ops] WARNING: ix_moe_bridge compile failed: {e}')
|
||||
print('[patch_ops] topk_softmax will use PyTorch fallback')
|
||||
" 2>&1 || echo "[patch_ops] WARNING: ix_moe_bridge pre-compile step failed"
|
||||
fi
|
||||
|
||||
# 7b. Precompile MoE topk_softmax CUDA kernel (.cu → .so)
|
||||
# 7. Precompile MoE topk_softmax CUDA kernel (.cu → .so)
|
||||
# This replaces the missing ixf_F.vllm_moe_topk_softmax with our own CUDA kernel
|
||||
MOE_TOPK_CU="/workspace/ex_engine/csrc/moe_topk_softmax_v3.cu"
|
||||
if [ -f "$MOE_TOPK_CU" ]; then
|
||||
|
||||
Reference in New Issue
Block a user