来源:
1. Chranos/ixformer (GitHub) → ixformer_sdk/ (230 files, 70K lines)
- inference/functions/vllm.py: vllm_moe_topk_softmax 完整实现 (2033 lines)
- inference/functions/moe.py: MoE ops 完整实现 (1380 lines)
- contrib/vllm_flash_attn/: FA2 Python 接口 (1018 lines)
- contrib/tgi/fused_moe.py: TGI fused MoE (429 lines)
- csrc/include/ixformer/: C++ kernel headers + cmake
2. Deep-Spark/xllm (GitHub) → upstream_ref/xllm_latest/ (+15 files)
- npu_torch/qwen3_5_decoder_layer_impl.cpp/.h
- npu_torch/qwen3_5_gated_delta_net.cpp/.h
- npu_torch/qwen3_next_*.cpp/.h (6 files)
- npu_torch/attention.cpp/.h + fused_moe.cpp/.h + CMakeLists.txt
- models/llm/qwen3_5.h + qwen3_5_mtp.h + qwen3_next.h
- models/vlm/qwen3_5.h
调用链完整性:
ixformer_sdk/inference/functions/vllm.py
→ ops.infer.moe_topk_softmax() (C++ 层)
→ 这就是 base 镜像 libixformer.so 里的实现
upstream_ref/xllm_latest/core/layers/ilu/fused_moe.cpp
→ ixformer::infer::topk_softmax() (直接 C++ 调用)
→ ixformer::infer::group_gemm() → 完整 7-step MoE pipeline
Upstream Reference: Deep-Spark xllm + vllm (FULL TREE)
Source repos (cloned 2026-08-09, Apache 2.0):
Deep-Spark/xllm— Iluvatar official C++ LLM inference engine (1470 files)Deep-Spark/vllm— Iluvatar official vllm fork (703 files, csrc + model layer)
What's here
xllm/ (complete source minus git/binaries/submodules)
天数智芯官方下一代推理引擎,C++ 原生,多平台(CUDA/ILU/MLU/NPU)。 包含 kernels → layers → models → runtime → scheduler → api_service 完整栈。
Key subtrees:
xllm/core/kernels/ilu/— ixformer API wrappers (ixformer.h是金矿)xllm/core/kernels/cuda/moe/— MoE CUDA kernels (topk_softmax, fused_topk)xllm/core/kernels/cuda/— activation, norm, rope, attention CUDA kernelsxllm/core/layers/ilu/— Iluvatar FusedMoE完整pipelinexllm/core/layers/npu_torch/— GatedDeltaNet C++ implementationxllm/models/llm/qwen3_5.h— Qwen3.5 model definitionxllm/compiler/tilelang/— GDN kernel code generation
ds_vllm/ (csrc + model layers + fused_moe)
天数智芯官方vllm fork,Python + CUDA torch extension。
csrc/— ALL CUDA source (attention, moe, quantization, cache)csrc/libtorch_stable/moe/topk_softmax_kernels.cu— vllm topk_softmaxvllm/_custom_ops.py— Python → torch.ops._moe_C bridgevllm/model_executor/models/qwen3_5.py— ds_vllm的qwen3_5实现vllm/model_executor/layers/fused_moe/— vllm FusedMoE Python layer