pub struct ShapeInferenceDebugger { /* private fields */ }Expand description
Main shape inference debugger
Implementations§
Source§impl ShapeInferenceDebugger
impl ShapeInferenceDebugger
Sourcepub fn with_config(config: DebugConfig) -> Self
pub fn with_config(config: DebugConfig) -> Self
Create a debugger with custom configuration
Sourcepub fn enable_tracing(&mut self, enabled: bool)
pub fn enable_tracing(&mut self, enabled: bool)
Enable or disable tracing
Sourcepub fn register_shape(&mut self, name: impl Into<String>, shape: Shape)
pub fn register_shape(&mut self, name: impl Into<String>, shape: Shape)
Register a named shape for reference
Sourcepub fn infer_elementwise_shape(&self, shapes: &[Shape]) -> Result<Shape>
pub fn infer_elementwise_shape(&self, shapes: &[Shape]) -> Result<Shape>
Infer shape for element-wise operation
Sourcepub fn infer_matmul_shape(&self, a: &Shape, b: &Shape) -> Result<Shape>
pub fn infer_matmul_shape(&self, a: &Shape, b: &Shape) -> Result<Shape>
Infer shape for matrix multiplication
Sourcepub fn infer_broadcast_shape(&self, shapes: &[Shape]) -> Result<Shape>
pub fn infer_broadcast_shape(&self, shapes: &[Shape]) -> Result<Shape>
Infer shape for broadcasting
Sourcepub fn infer_concat_shape(&self, shapes: &[Shape], dim: i32) -> Result<Shape>
pub fn infer_concat_shape(&self, shapes: &[Shape], dim: i32) -> Result<Shape>
Infer shape for concatenation
Sourcepub fn clear_trace(&mut self)
pub fn clear_trace(&mut self)
Clear the trace
Sourcepub fn get_statistics(&self) -> TraceStatistics
pub fn get_statistics(&self) -> TraceStatistics
Get trace statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShapeInferenceDebugger
impl RefUnwindSafe for ShapeInferenceDebugger
impl Send for ShapeInferenceDebugger
impl Sync for ShapeInferenceDebugger
impl Unpin for ShapeInferenceDebugger
impl UnsafeUnpin for ShapeInferenceDebugger
impl UnwindSafe for ShapeInferenceDebugger
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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