vllm.models.inkling.nvidia.ops.norm ¶
Functions:
-
add_rmsnorm–Fused
res = residual + delta; y = rmsnorm(res). -
embed_rmsnorm–Fused
rmsnorm(embed_table[input_ids], weight)row gather + norm.
add_rmsnorm(residual, delta, weight, eps) ¶
Fused res = residual + delta; y = rmsnorm(res).
Returns (y, res); both are fresh tensors (cudagraph-friendly, no in-place update of the inputs).
Source code in vllm/models/inkling/nvidia/ops/norm.py
embed_rmsnorm(input_ids, embed_table, weight, eps, chain_weight=None) ¶
Fused rmsnorm(embed_table[input_ids], weight) row gather + norm.
Requires the full vocab on-rank (replicated or tp_size == 1). weight=None skips the norm (use_embed_norm=False), leaving a pure embedding-table gather. chain_weight additionally emits rmsnorm(out, chain_weight) (the first decoder layer's pre-attention norm) as a second output, still one launch. Bit-exact vs the unfused module sequence.