tracel-ai/burn · error

{err:?} - {:?}

Error message

{err:?} - {:?}

What it means

Kernel-launch failure escalation: `ElemwiseOptimization::execute` runs the fused trace via `FuseTraceLauncher::launch`, and any launcher error (compilation or GPU execution failure) is converted into a panic that also dumps the whole `FuseTrace` for debugging. The panic means the generated CubeCL kernel failed to launch — the underlying cause is the debug-printed error `err`, the trace dump is context.

Source

Thrown at crates/burn-cubecl-fusion/src/optim/elemwise/optimization.rs:49

    len: usize,
}

#[derive(Serialize, Deserialize, Debug)]
/// State for the [elemwise optimization](ElemwiseOptimization).
pub struct ElemwiseOptimizationState {
    trace: FuseTrace,
    len: usize,
}

impl ElemwiseOptimization {
    /// Execute the optimization.
    pub fn execute(&self, context: &mut Context<CubeFusionHandle>) {
        let launcher = FuseTraceLauncher::new(&self.trace, &ElemwiseRunner);

        match launcher.launch(&self.client, &self.device, context) {
            Ok(_) => (),
            Err(err) => {
                panic!("{err:?} - {:?}", self.trace);
            }
        }
    }

    /// Number of element wise operations fused.
    pub fn num_ops_fused(&self) -> usize {
        self.len
    }

    /// Create an optimization from its [state](ElemwiseOptimizationState).
    pub fn from_state(device: &cubecl::Device, state: ElemwiseOptimizationState) -> Self {
        Self {
            trace: state.trace,
            len: state.len,
            client: device.client(),
            device: device.clone(),
        }
    }

View on GitHub (pinned to d16f7ba2ed)

Solutions

  1. Inspect the dumped `FuseTrace` for oversized/invalid operations and simplify or split the fused elementwise chain.
  2. Verify shader/device compatibility and that the client/device arguments match the compilation target.
  3. Retry after clearing compile caches if the failure is a stale-cached kernel artifact.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/burn-cubecl-fusion/src/optim/elemwise/optimization.rs:49 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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