fix: fail-fast on ix_bridge failure + probe script for real machine

1. ix_bridge.py: RuntimeError instead of silent PyTorch fallback
   If JIT compile fails, crash immediately with diagnostic message.
   0 score with no error log is worse than a visible crash.

2. qwen3_5.py: explicit WARNING log on import failure (not silent)
   Shows exact error so we can diagnose from docker log.

3. probe_ixformer_symbols.py: definitive test for real machine
   - Finds all ixformer .so files
   - nm/objdump for topk_softmax C++ symbol
   - Checks Python bindings
   - Attempts JIT compile + link (the real test)
   - Prints PASS/FAIL with next-step instructions

Run on real machine: python3 probe_ixformer_symbols.py
This commit is contained in:
EX Engine
2026-08-10 03:04:50 +00:00
parent d21b2505bb
commit e04a3bace9
3 changed files with 243 additions and 15 deletions

View File

@@ -74,6 +74,7 @@ except ImportError:
# ix_bridge: C++ bridge to ixformer::infer::topk_softmax (bypasses missing Python binding)
_ix_bridge_module = None
_ix_bridge_available = False
_ix_topk_softmax = None
try:
from ex_engine.python.ix_bridge import topk_softmax as _ix_topk_softmax
_ix_bridge_available = True
@@ -88,8 +89,11 @@ except ImportError:
from ex_engine.python.ix_bridge import topk_softmax as _ix_topk_softmax
_ix_bridge_available = True
logger.info("ix_bridge: ixformer C++ topk_softmax available (deployed path)")
except ImportError:
logger.info("ix_bridge: not available, MoE uses PyTorch topk")
except ImportError as e:
# NOT silent: log the exact error so we can diagnose from docker logs
logger.warning(
"ix_bridge: IMPORT FAILED (%s). MoE will use PyTorch topk. "
"This is 3x slower. Run probe_ixformer_symbols.py to diagnose.", e)
_corex_gdn_available = False
_corex_moe_available = False