dense_auto

Function dense_auto 

Source
pub fn dense_auto(
    store: &WeightStore,
    name: &str,
    gpu: &dyn GpuBackend,
) -> Result<DenseWeight>
Expand description

2026-09-25: Load name as a BF16 DenseWeight, converting by dtype:

  • BF16: the store pointer itself;
  • FP32: dense_f32_safe;
  • FP8E4M3: dequant_fp8_blockscaled_to_bf16 when the weight has a weight_scale_inv, a multi-element weight_scale or a .scale, else the per-tensor dequant_fp8_to_bf16;
  • UInt8 (packed NVFP4, [n, k/2]): dequant_nvfp4_to_bf16.

Any other dtype is an error. FP8 and NVFP4 names must end in .weight.