pack_bf16_weight_to_nvfp4_t

Function pack_bf16_weight_to_nvfp4_t 

Source
pub fn pack_bf16_weight_to_nvfp4_t(
    weight_bf16: u64,
    packed_t: u64,
    scale_t: u64,
    n: u32,
    k: u32,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: Pack a row-major BF16 weight [N,K] into CUTLASS NVFP4: packed [N,K/2] (K-contiguous) and E4M3 scales [K/16,N], each scale the group’s max magnitude / 6. The scales carry no second-level factor, so pass weight_scale_2 = 1.0 to nvfp4_gemm_bf16_act_weight_t.