pub struct AutoMixedPrecision {
pub policy: PrecisionPolicy,
}Expand description
Pass that rewrites a graph according to a PrecisionPolicy.
For each node:
- Look up the target precision based on op kind.
- Update
node.shape.dtypeto that precision. - If any input has a different dtype, insert a Cast node before it.
After this pass, every node knows its compute precision via its shape dtype. Backends dispatch kernels per-node.
Fields§
§policy: PrecisionPolicyImplementations§
Source§impl AutoMixedPrecision
impl AutoMixedPrecision
pub fn new(policy: PrecisionPolicy) -> AutoMixedPrecision
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AutoMixedPrecision
impl RefUnwindSafe for AutoMixedPrecision
impl Send for AutoMixedPrecision
impl Sync for AutoMixedPrecision
impl Unpin for AutoMixedPrecision
impl UnsafeUnpin for AutoMixedPrecision
impl UnwindSafe for AutoMixedPrecision
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