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_bf16when the weight has aweight_scale_inv, a multi-elementweight_scaleor a.scale, else the per-tensordequant_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.