vllm.models.inkling2.nvidia.ops.linear
¶
bf16 linears: small batches on FlashInfer's CuTe DSL low-M kernels, and the
reference linear with fp32 accumulation in ordered 1024-wide K groups.
Functions:
-
k_group_partials–fp32 partials [G, T, N] of
x @ weight.Twhose in-order sum over G is -
linear–bf16
x @ weight.Twith fp32 accumulation (intooutif given, -
linear_k_groups–x @ weight.Tfor bf16x[T, K] andweight[N, K].
k_group_partials(x, weight, out_dtype=torch.float32, launch_dependents=False)
¶
fp32 partials [G, T, N] of x @ weight.T whose in-order sum over G is
the reference linear. G is 1 (already summed, in out_dtype) when
there are enough rows to fill the GPU without splitting K. With
launch_dependents, the next kernel may start (and must wait) while
the TMA kernel runs.
Source code in vllm/models/inkling2/nvidia/ops/linear.py
linear(x, weight, out=None)
¶
bf16 x @ weight.T with fp32 accumulation (into out if given,
batches over LOW_M_MAX_TOKENS only).
Source code in vllm/models/inkling2/nvidia/ops/linear.py
linear_k_groups(x, weight, out_dtype=torch.float32)
¶
x @ weight.T for bf16 x [T, K] and weight [N, K].
Each 1024-wide K group is accumulated in fp32 and the partials are summed in
order, as in the reference linear.