pub struct TPUOptimizer<O, A>{ /* private fields */ }Expand description
TPU-optimized optimizer wrapper
Implementations§
Source§impl<O, A> TPUOptimizer<O, A>
impl<O, A> TPUOptimizer<O, A>
Sourcepub fn initialize_xla_graph(&mut self) -> Result<()>
pub fn initialize_xla_graph(&mut self) -> Result<()>
Initialize XLA computation graph
Sourcepub fn compile_step(&mut self, inputshapes: &[XLAShape]) -> Result<String>
pub fn compile_step(&mut self, inputshapes: &[XLAShape]) -> Result<String>
Compile optimizer step for TPU execution
Sourcepub fn tpu_step<S, DIM>(
&mut self,
params: &ArrayBase<S, DIM>,
gradients: &ArrayBase<S, DIM>,
) -> Result<Array<A, DIM>>
pub fn tpu_step<S, DIM>( &mut self, params: &ArrayBase<S, DIM>, gradients: &ArrayBase<S, DIM>, ) -> Result<Array<A, DIM>>
Execute TPU-optimized step
Sourcepub fn get_performance_metrics(&self) -> TPUPerformanceMetrics
pub fn get_performance_metrics(&self) -> TPUPerformanceMetrics
Get TPU performance metrics
Sourcepub fn optimize_memory_layout(&mut self) -> Result<()>
pub fn optimize_memory_layout(&mut self) -> Result<()>
Optimize TPU memory layout
Sourcepub fn get_topology_info(&self) -> TPUTopologyInfo
pub fn get_topology_info(&self) -> TPUTopologyInfo
Get TPU topology information
Auto Trait Implementations§
impl<O, A> Freeze for TPUOptimizer<O, A>where
O: Freeze,
impl<O, A> RefUnwindSafe for TPUOptimizer<O, A>where
O: RefUnwindSafe,
A: RefUnwindSafe,
impl<O, A> Send for TPUOptimizer<O, A>
impl<O, A> Sync for TPUOptimizer<O, A>
impl<O, A> Unpin for TPUOptimizer<O, A>
impl<O, A> UnsafeUnpin for TPUOptimizer<O, A>where
O: UnsafeUnpin,
impl<O, A> UnwindSafe for TPUOptimizer<O, A>where
O: UnwindSafe,
A: UnwindSafe,
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.