Skip to main content

Module compilation

Module compilation 

Source
Expand description

Graph compilation and caching infrastructure.

This module provides ahead-of-time graph optimization and compilation capabilities:

  • CompiledGraph: Optimized, executable representation of computation graphs
  • GraphCompiler: Applies optimization passes and produces compiled graphs
  • CompilationCache: Caches compiled graphs to avoid recompilation
  • TlCompilableExecutor: Trait for executors that support graph compilation

§Example

use tensorlogic_infer::compilation::{GraphCompiler, CompilationConfig, OptimizationLevel};
use tensorlogic_infer::DummyExecutor;
use tensorlogic_ir::EinsumGraph;

let mut compiler = GraphCompiler::new(CompilationConfig {
    optimization_level: OptimizationLevel::Aggressive,
    ..Default::default()
});

let graph = EinsumGraph::new();
let compiled = compiler.compile(&graph).unwrap();

Structs§

CacheStats
Statistics for the compilation cache.
CompilationCache
Cache for compiled graphs.
CompilationConfig
Configuration for graph compilation.
CompilationKey
Cache key for compiled graphs.
CompilationStats
Statistics about the compilation process.
CompiledGraph
Compiled representation of a computation graph.
GraphCompiler
Graph compiler that applies optimization passes.

Enums§

OptimizationLevel
Optimization level for graph compilation.

Traits§

TlCompilableExecutor
Trait for executors that support graph compilation.