Expand description
2026-09-25: CUDA SiTU-GLU MLP for Kimi K3 (a dense layer’s MLP or a LatentMoE layer’s shared expert) on the resident BF16/FP32 weights, with FP32 activations.
Decode uses it only with K3_CUDA_DENSE=1. Only the input row and the output
row cross the host boundary; the weights are read where the loader put them.
Owner: model-arch, Kimi K3. Invariants:
- Every scratch buffer a launch allocates gets a
freecall when it returns, on success and on error (Scratchon drop); a failedfreeis ignored.
Functions§
- launch_
dense_ matrices - 2026-09-25: Runs the gate/up SiTU kernel and the down kernel on explicit device weights. Dtype tags: 0 = FP32, 1 = BF16.
- launch_
dense_ mlp - 2026-09-25: Finds the layer’s resident
gate/up/downweights (under.mlp.for a dense layer,.block_sparse_moe.shared_experts.for a LatentMoE layer), checks each holdshidden * intervalues, and runslaunch_dense_matrices.