[][src]Struct tensorflow_proto::xla::WhileLoopBackendConfig

pub struct WhileLoopBackendConfig {
    pub known_trip_count: Option<KnownTripCount>,
}

A backend-config for kWhile loops that stores the loop's trip count, if it is known.

This is useful for backends that can implement a for i in 0..N loop more efficiently than a while loop. For example, on GPUs, we can implement a for i in 0..N loop by enqueueing the kernels for the loop body N times, whereas implementing a while loop requires a host-device sync on each iteration.

Fields

known_trip_count: Option<KnownTripCount>

This indirection lets us distinguish between known-trip-count == 0 and unknown-trip-count.

Trait Implementations

impl Clone for WhileLoopBackendConfig[src]

impl Debug for WhileLoopBackendConfig[src]

impl Default for WhileLoopBackendConfig[src]

impl Message for WhileLoopBackendConfig[src]

impl PartialEq<WhileLoopBackendConfig> for WhileLoopBackendConfig[src]

impl StructuralPartialEq for WhileLoopBackendConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.