tenferro_runtime/graph/mod.rs
1//! Graph compilation APIs.
2//!
3//! # Examples
4//!
5//! ```
6//! use tenferro_runtime::{GraphCompiler, TracedTensor};
7//!
8//! let x = TracedTensor::from_vec_col_major(vec![2], vec![1.0_f64, 2.0]).unwrap();
9//! let y = (&x + &x).unwrap();
10//! let mut compiler = GraphCompiler::new();
11//! let program = compiler.compile(&y).unwrap();
12//! assert_eq!(program.output_count(), 1);
13//! ```
14
15pub(crate) mod cache;
16mod compiler;
17mod executor;
18mod lowering_view;
19mod program;
20
21pub use cache::{GraphCompilerCacheStats, GraphExecutorCacheStats};
22pub use compiler::GraphCompiler;
23pub use executor::GraphExecutor;
24pub use lowering_view::{
25 GraphInstructionView, GraphOpView, GraphProgramLoweringShapeError, GraphProgramLoweringView,
26};
27pub use program::{GraphProgram, GraphProgramInput};