pub struct CompilationSnapshot {
pub expression: String,
pub strategy: String,
pub domains: Vec<(String, usize)>,
pub tensor_count: usize,
pub node_count: usize,
pub depth: usize,
pub operations: HashMap<String, usize>,
pub estimated_flops: u64,
pub estimated_memory: u64,
pub dot_output: String,
pub json_output: String,
pub created_at: String,
}Expand description
A snapshot of compilation output for testing
Fields§
§expression: StringThe expression that was compiled
strategy: StringCompilation strategy used
domains: Vec<(String, usize)>Domains defined
tensor_count: usizeNumber of tensors in the graph
node_count: usizeNumber of nodes in the graph
depth: usizeGraph depth
operations: HashMap<String, usize>Operation breakdown
estimated_flops: u64Estimated FLOPs
estimated_memory: u64Estimated memory (bytes)
dot_output: StringDOT format representation (for structural comparison)
json_output: StringJSON serialization (for complete graph structure)
created_at: StringCreation timestamp
Implementations§
Source§impl CompilationSnapshot
impl CompilationSnapshot
Sourcepub fn create(
expr: &TLExpr,
context: &CompilerContext,
expr_string: &str,
) -> Result<Self>
pub fn create( expr: &TLExpr, context: &CompilerContext, expr_string: &str, ) -> Result<Self>
Create a snapshot from an expression and context
Sourcepub fn compare(&self, other: &Self) -> SnapshotDiff
pub fn compare(&self, other: &Self) -> SnapshotDiff
Compare this snapshot with another (strict mode)
Note: Timestamps are intentionally excluded from comparison
Sourcepub fn compare_with_options(
&self,
other: &Self,
strict_dot: bool,
) -> SnapshotDiff
pub fn compare_with_options( &self, other: &Self, strict_dot: bool, ) -> SnapshotDiff
Compare this snapshot with another with options
strict_dot: If true, compare DOT output character-by-character If false, skip DOT comparison (useful when DOT has non-deterministic ordering)
Trait Implementations§
Source§impl Clone for CompilationSnapshot
impl Clone for CompilationSnapshot
Source§fn clone(&self) -> CompilationSnapshot
fn clone(&self) -> CompilationSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompilationSnapshot
impl Debug for CompilationSnapshot
Source§impl<'de> Deserialize<'de> for CompilationSnapshot
impl<'de> Deserialize<'de> for CompilationSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompilationSnapshot
impl RefUnwindSafe for CompilationSnapshot
impl Send for CompilationSnapshot
impl Sync for CompilationSnapshot
impl Unpin for CompilationSnapshot
impl UnwindSafe for CompilationSnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more