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§

GraphCompiler
Compiler for traced tensor graphs.
GraphCompilerCacheStats
Stats for caches owned by a GraphCompiler.
GraphExecutor
Executes compiled graph programs on a concrete tensor backend.
GraphExecutorCacheStats
Stats for runtime caches owned by a graph executor.
GraphInstructionView
Read-only lowering view over one execution instruction.
GraphProgram
A compiled traced graph, independent of any execution backend.
GraphProgramInput
A single ordered input required by a GraphProgram.
GraphProgramLoweringView
Read-only lowering view over a compiled graph program.

Enums§

GraphOpView
Read-only operation view for graph lowering integrations.
GraphProgramLoweringShapeError
Error returned when a lowering view cannot resolve an exact output shape.