Skip to main content

Module graph

Module graph 

Source
Expand description

Graph compilation APIs.

§Examples

use tenferro_runtime::{GraphCompiler, TracedTensor};

let x = TracedTensor::from_vec_col_major(vec![2], vec![1.0_f64, 2.0]).unwrap();
let y = (&x + &x).unwrap();
let mut compiler = GraphCompiler::new();
let program = compiler.compile(&y).unwrap();
assert_eq!(program.output_count(), 1);

Structs§

CompiledGraph
A backend-neutral compiled semantic graph with runtime-private execution staging.
GraphCompiler
Compiler for traced tensor graphs.