tenferro-ad 0.2.0

Eager runtime, eager tensors, and traced AD extension traits for tenferro.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use tenferro_runtime::Error;
use tidu::ADRuleError;

pub(crate) fn ad_rule_error(transform: &'static str, err: ADRuleError) -> Error {
    match err {
        ADRuleError::Unsupported { op, .. } => Error::UnsupportedAdRule { transform, op },
        ADRuleError::InvalidInput { op, message, .. } => Error::InvalidGraphBuild {
            op: transform,
            message: format!("{op}: {message}"),
        },
    }
}