tracel-ai/burn · error

Not yet supported

Error message

Not yet supported

What it means

In crates/burn-cubecl-fusion/src/base.rs, tensor metadata construction maps `ScaleDtype` to Burn `DType`; `UE8M0` and `UE4M3` scale dtypes hit `unimplemented!("Not yet supported")` because microscaling FP8 scale formats are not yet wired into the fusion backend.

Source

Thrown at crates/burn-cubecl-fusion/src/base.rs:113

        // Only the block scale is threaded through below; a two-level scheme's per-tensor scale
        // would be silently dropped, so refuse rather than build a handle short one factor.
        assert!(
            global_scale_dtype(&scheme).is_none(),
            "fused kernels don't yet support a two-level scheme's per-tensor scale"
        );
        let mut handle = self.handle.clone();
        handle.offset_start = Some(qparams.scales.offset_start as u64);
        handle.offset_end = Some(qparams.scales.offset_end as u64);

        Some(Self {
            client: self.client.clone(),
            handle,
            device: self.device.clone(),
            dtype: match scheme.scale_dtype() {
                ScaleDtype::F32 => DType::F32,
                ScaleDtype::F16 => DType::F16,
                ScaleDtype::BF16 => DType::BF16,
                ScaleDtype::UE8M0 | ScaleDtype::UE4M3 => unimplemented!("Not yet supported"),
            },
            strides: qparams.scales.metadata.strides().clone(),
            qparams: None,
        })
    }
}

pub(crate) fn strides_dyn_rank(shape: &[usize]) -> Strides {
    let mut strides = strides![0; shape.len()];

    let mut current = 1;
    shape.iter().enumerate().rev().for_each(|(index, val)| {
        strides[index] = current;
        current *= val;
    });

    strides
}

View on GitHub (pinned to d16f7ba2ed)

Solutions

  1. Use a supported scale dtype (`ScaleDtype::F32`, `F16`, or `BF16`) in the quantization scheme.
  2. Avoid the fusion backend for quantized tensors with UE8M0/UE4M3 scales; use a non-fused path.
  3. Upgrade to a Burn/CubeCL version that implements the microscaling scale dtype mapping.

Example fix

// before
let scheme = QuantScheme::new(...).with_scale_dtype(ScaleDtype::UE8M0); // panics in base.rs metadata build

// after
let scheme = QuantScheme::new(...).with_scale_dtype(ScaleDtype::F32); // supported
Defensive patterns

Strategy: validation

Validate before calling

fn is_supported_scale_dtype(s: &ScaleDtype) -> bool {
    matches!(s, ScaleDtype::F32 | ScaleDtype::F16 | ScaleDtype::BF16)
}
assert!(is_supported_scale_dtype(&scheme.scale_dtype()), "use F32/F16/BF16 scale dtype");

Type guard

fn is_mx_scale_dtype(s: &ScaleDtype) -> bool {
    matches!(s, ScaleDtype::UE8M0 | ScaleDtype::UE4M3)
}

Prevention

When it happens

Trigger: Constructing a fused quantized tensor handle whose quantization scheme uses `ScaleDtype::UE8M0` or `ScaleDtype::UE4M3` (mxFP8-style block scales).

Common situations: Running quantized (microscaling) models through the CubeCL fusion backend; exporting/initializing quantized weights with FP8 block-scale formats on supported hardware.

Related errors


AI-assisted analysis of tracel-ai/burn@d16f7ba2ed (2026-09-05). Data as JSON: /api/errors/7aba66bc71a6a46d. Report an issue: GitHub.