1use thiserror::Error;
9
10pub type FusionResult<T> = Result<T, FusionError>;
12
13#[derive(Error, Debug)]
15pub enum FusionError {
16 #[error("Invalid input shape: expected {expected:?}, got {actual:?}")]
18 ShapeMismatch {
19 expected: Vec<usize>,
21 actual: Vec<usize>,
23 },
24
25 #[error("Pattern not fusable: {0}")]
27 NotFusable(String),
28
29 #[error("Invalid fusion configuration: {0}")]
31 InvalidConfig(String),
32
33 #[error("Execution error: {0}")]
35 Execution(String),
36
37 #[error("Tensor conversion error: {0}")]
39 TensorError(String),
40}