c8a982c4e8c9f2fb59957ad1f4eaa430b113517b
Ported from ex_engine/csrc/ix_full_bridge_v2.cpp + ix_moe_bridge.cpp.
Source: upstream_ref/xllm_latest/core/kernels/ilu/ixformer.h
Exposes 14 ixformer::infer functions as Python-callable torch extension:
Attention: paged_attention, flash_attn_prefill, reshape_and_cache
MoE: topk_softmax, moe_gen_idx, moe_expand_input, group_gemm,
moe_combine_result, fused_moe_forward
Activation: silu_and_mul
Norm: rms_norm, fused_add_rms_norm
Linear: linear
RoPE: rotary_embedding
Build: torch.utils.cpp_extension.load() in docker build (patch_ops.sh)
Links against libixformer.so from base image at runtime.
This replaces PyTorch MoE fallback (the #1 performance bottleneck).
Without bridge: MoE loops over experts in Python → ~3 TPS decode
With bridge: fused 7-step pipeline in C++ → ~16 TPS decode (sub168 level)
project_6
Description
Languages
C++
41.8%
Cuda
31.6%
Python
22.2%
C
2.1%
CMake
1.1%
Other
1.1%