[−][src]Struct tensorflow_proto::xla::LayoutProto
A layout describes how the array is placed in (1D) memory space. This includes the minor-to-major ordering of dimensions within a shape.
Clients must specify the layouts of input Literals to the computation. Layouts specified in interior operations which take Shapes (for example, Convert) are ignored.
See the XLA documentation for more information on shapes and layouts.
LINT.IfChange
Fields
format: i32
The method used to store the data in memory. The format determines which of the other fields are used by the layout.
minor_to_major: Vec<i64>
Sequence of dimension numbers, from minor (fastest varying index) to major (slowest varying index). This field is required.
max_sparse_elements: i64
The maximum number of elements that can be stored for SPARSE formats. This can be used to determine the maximum size in bytes of arrays stored in memory. This field must be unset unless the format is SPARSE.
tiles: Vec<TileProto>
A sequence of tiles, starting from the tile that's applied first to the Shape.
TODO(b/119839262): implement tiling in each backend or add Unimplemented error.
element_size_in_bits: i64
Bit size of each element. If the size is bigger than what the element type requires, the value is stored in the least significant bits and the additional most significant bits are filled with 0's.
TODO(b/119839262): implement in each backend or add Unimplemented error.
memory_space: i64
Memory space where this array resides. The integer field is interpreted in a backend-specific manner.
Implementations
impl LayoutProto
[src]
pub fn format(&self) -> Format
[src]
Returns the enum value of format
, or the default if the field is set to an invalid enum value.
pub fn set_format(&mut self, value: Format)
[src]
Sets format
to the provided enum value.
Trait Implementations
impl Clone for LayoutProto
[src]
pub fn clone(&self) -> LayoutProto
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LayoutProto
[src]
impl Default for LayoutProto
[src]
impl Message for LayoutProto
[src]
pub fn encode_raw<B>(&self, buf: &mut B) where
B: BufMut,
[src]
B: BufMut,
pub fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
[src]
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
pub fn encoded_len(&self) -> usize
[src]
pub fn clear(&mut self)
[src]
pub fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn decode<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
pub fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
impl PartialEq<LayoutProto> for LayoutProto
[src]
pub fn eq(&self, other: &LayoutProto) -> bool
[src]
pub fn ne(&self, other: &LayoutProto) -> bool
[src]
impl StructuralPartialEq for LayoutProto
[src]
Auto Trait Implementations
impl RefUnwindSafe for LayoutProto
[src]
impl Send for LayoutProto
[src]
impl Sync for LayoutProto
[src]
impl Unpin for LayoutProto
[src]
impl UnwindSafe for LayoutProto
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,