Commit Graph

3 Commits

Author SHA1 Message Date
project6-dev
7127d18491 refactor(bridge): rewrite ix_full_bridge.cpp for actual base image symbols
Symbol probe revealed ixformer::infer namespace does NOT exist in base image.
That namespace is xllm's own compiled wrapper layer.

Actual available symbols in base image:
  _ixformer_torch.so: silu_and_mul_forward, rms_norm_forward,
    fused_add_rms_norm_forward, ixformer_linear, ixformer_linear_ex
  libixformer.so: ixinfer_flash_attn_unpad_fwd (different signature)

MoE functions (topk_softmax, group_gemm, moe_expand_input, etc.)
are NOT in any base image .so — MoE must use Python path.

Bridge now only wraps: silu_and_mul, rms_norm, fused_add_rms_norm, linear
These accelerate the per-layer ops that run 200x per token.
2026-08-10 06:34:54 +00:00
project6-dev
ac3c8e28eb fix(bridge): c10::nullopt → typed std::optional{} for CoreX torch compat
CoreX torch's c10::nullopt cannot implicitly convert to const std::optional<T>&.
Solution: use static typed empty optionals (kNoneTensor, kNoneBool).
Also unified all c10::optional forward decls to std::optional.
Applied same fix to ix_moe_bridge.cpp.
2026-08-10 06:25:15 +00:00
EX Engine
f955dd127e feat(EX): ix_full_bridge — all 14 ixformer::infer functions bridged
Upstream source: xllm/core/kernels/ilu/ixformer.h (Apache 2.0)
Wrapper patterns: xllm/core/kernels/ilu/{attention,norm,rope,activation,fused_moe,group_gemm}.cpp

Complete bridge (ix_full_bridge.cpp, 331 lines):
  MoE:       topk_softmax, gen_idx, expand, group_gemm, silu_mul, combine, fused_forward
  Attention: paged_attention (decode), flash_attn_prefill (prefill)
  Norm:      rms_norm, fused_add_rms_norm
  RoPE:      rotary_embedding
  Cache:     reshape_and_cache
  Linear:    ixformer_linear

ix_bridge.py: tries ix_full_bridge first, falls back to ix_moe_bridge
patch_ops.sh: deploys both .cpp files to all JIT search paths
Copied ixformer.h + utils.h headers for reference
2026-08-10 04:01:42 +00:00