c0cc4e7dc9cbc95e3b3af00969d4256484ce046e
topk_softmax was falling back to PyTorch softmax+topk (Python-level, called 36 times per decode step). We already have a fused CUDA kernel (moe_topk_softmax_v3.cu, 148 lines, warp-shuffle, zero SMEM) that's precompiled during Docker build — it just wasn't wired in. Dispatch chain: 1. Try import precompiled moe_topk_softmax_v3.so 2. Try JIT compile from .cu source (deployed by patch_ops.sh) 3. PyTorch fallback (softmax → topk) The CUDA kernel does fused softmax+topk in a single kernel launch per token batch — vs PyTorch's 2 separate kernel launches + Python overhead. On 64 experts, topk=8: ~5x faster per call, 36 calls/layer/step.
project_6
Description
Languages
C++
41.8%
Cuda
31.6%
Python
22.2%
C
2.1%
CMake
1.1%
Other
1.1%