use onnx_runtime_ir::DeviceId;
pub type Result<T> = std::result::Result<T, EagerError>;
#[derive(Debug, thiserror::Error)]
pub enum EagerError {
#[error("no kernel for op '{op_type}' (domain {domain:?}) on device {device:?}")]
NoKernel {
op_type: String,
domain: String,
device: DeviceId,
},
#[error("mixed-device inputs {devices:?}: {hint}")]
MixedDeviceInputs {
devices: Vec<DeviceId>,
hint: String,
},
#[error("no execution provider registered for device {0:?}")]
NoEpForDevice(DeviceId),
#[error("shape inference failed for op '{op_type}' (domain {domain:?}): {reason}")]
ShapeInference {
op_type: String,
domain: String,
reason: String,
},
#[error("execution provider error: {0}")]
Kernel(#[from] onnx_runtime_ep_api::EpError),
#[error("shape-inference engine error: {0}")]
ShapeInferEngine(#[from] onnx_runtime_shape_inference::ShapeInferError),
#[error("ir error: {0}")]
Ir(#[from] onnx_runtime_ir::IrError),
}