{"record":{"id":"5d556f400438ca7d","repo":"tracel-ai/burn","slug":"unimplemented-5d556f","errorCode":null,"errorMessage":"unimplemented!()","messagePattern":"unimplemented!\\(\\)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-cubecl/src/ops/qtensor.rs","lineNumber":322,"sourceCode":"            shape,\n            dtype,\n        })\n    }\n\n    fn q_swap_dims(\n        tensor: QuantizedTensor<Self>,\n        dim1: usize,\n        dim2: usize,\n    ) -> QuantizedTensor<Self> {\n        swap_dims(tensor, dim1, dim2)\n    }\n\n    fn q_permute(tensor: QuantizedTensor<Self>, axes: &[usize]) -> QuantizedTensor<Self> {\n        permute(tensor, axes)\n    }\n\n    fn q_flip(_tensor: QuantizedTensor<Self>, _axes: &[usize]) -> QuantizedTensor<Self> {\n        unimplemented!()\n    }\n\n    fn q_matmul(lhs: TensorPrimitive<Self>, rhs: TensorPrimitive<Self>) -> TensorPrimitive<Self> {\n        let (settings, scheme) = match (&lhs, &rhs) {\n            (TensorPrimitive::QFloat(lhs), _) => {\n                (get_device_settings::<Self>(&lhs.device), lhs.scheme())\n            }\n            (_, TensorPrimitive::QFloat(rhs)) => {\n                (get_device_settings::<Self>(&rhs.device), rhs.scheme())\n            }\n            _ => unreachable!(),\n        };\n\n        // Inherit precision for mixed inputs, default to `FloatElem` for fully quantized.\n        let out_dtype = match (&lhs, &rhs) {\n            (TensorPrimitive::Float(lhs), _) => lhs.dtype,\n            (_, TensorPrimitive::Float(rhs)) => rhs.dtype,\n            _ => settings.float_dtype.into(),","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-cubecl/src/ops/qtensor.rs#L304-L340","documentation":"q_flip for the CubeCl quantized-tensor backend is a stub that immediately panics with unimplemented!(). Flipping a quantized tensor along axes is not implemented, even though q_permute is. This is a pure backend completeness gap; no input can make it succeed.","triggerScenarios":"Calling q_flip (or Tensor::flip on a quantized tensor / QTensorPrimitive) with the CubeCl backend, regardless of axes or shape.","commonSituations":"Data augmentation pipelines that flip quantized images on GPU; generic tensor code that calls flip without knowing the tensor is quantized; migrating models that apply flips after quantization.","solutions":["Flip the tensor BEFORE quantizing it (dequantize -> flip -> requantize if needed).","Re-express flip as slicing + cat or as permute/slice operations that are implemented for quantized tensors.","Perform the flip on a non-quantized (float) tensor and quantize afterwards.","Contribute an implementation to crates/burn-cubecl/src/ops/qtensor.rs (q_flip) upstream."],"exampleFix":"// before\nlet flipped = qtensor.flip(&[3]); // panics: q_flip unimplemented\n// after\nlet flipped = tensor.flip(&[3]).quantize(&scheme, &device); // flip then quantize","handlingStrategy":"validation","validationCode":"fn assert_not_quantized<T: QTensorPrimitive>(t: &T) { /* flip only non-quantized tensors */ }\n// or: only call .flip on float tensors, quantize afterwards","typeGuard":"fn can_flip_qtensor() -> bool { false } // q_flip is a stub for CubeCl; never call it","tryCatchPattern":null,"preventionTips":["Never call flip on quantized tensors with the CubeCl backend; flip before quantizing","Centralize flips in preprocessing on float tensors","Audit generic tensor pipelines for ops applied post-quantization","Track burn releases for q_flip implementation before enabling flip on QTensors"],"tags":["rust","burn","cubecl","quantization","flip","unimplemented"],"backgroundTag":"unsupported-op-backend","analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}