pub fn apply_eager(
op: Arc<dyn ExtensionOp>,
inputs: &[&EagerTensor],
) -> Result<Vec<EagerTensor>>Expand description
Apply an extension op to eager AD tensors.
ยงExamples
use tenferro_ad::extension::apply_eager;
use tenferro_ad::{EagerRuntime, EagerTensor};
use tenferro_cpu::CpuBackend;
use tenferro_tensor::Tensor;
let ctx = EagerRuntime::with_cpu_backend(CpuBackend::new());
let x = EagerTensor::from_tensor_in(
Tensor::from_vec_col_major(vec![1], vec![1.0_f64]).unwrap(),
ctx,
).unwrap();
let _ = &x;
let _apply = apply_eager;