pub struct TensorIr {
pub id: TensorId,
pub shape: Shape,
pub status: TensorStatus,
pub dtype: DType,
}Expand description
A tensor definition represents a snapshot of a tensor when it was used.
§Example
A tensor that is used multiple times has its status updated for each operation.
- Status::NotInit
- Status::ReadOnly
- Status::ReadOnly
- Status::ReadWrite
Fields§
§id: TensorIdThe tensor id.
shape: ShapeThe shape of the tensor.
status: TensorStatusThe status of the tensor when it was used.
dtype: DTypeThe type of the tensor.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TensorIr
impl<'de> Deserialize<'de> for TensorIr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TensorIr
impl StructuralPartialEq for TensorIr
Auto Trait Implementations§
impl Freeze for TensorIr
impl RefUnwindSafe for TensorIr
impl Send for TensorIr
impl Sync for TensorIr
impl Unpin for TensorIr
impl UnwindSafe for TensorIr
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.