pub struct StreamTensor<'l, const T: Tu, P: Position, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> { /* private fields */ }Expand description
Tensor streamed through the pipeline.
Implementations§
Source§impl<'l, const T: Tu, P: Position, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, P, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, P: Position, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, P, D, Chip, Cluster, Slice, Time, Packet>
Source§impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionBegin, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionBegin, D, Chip, Cluster, Slice, Time, Packet>
Source§impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionFetch, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionFetch, D, Chip, Cluster, Slice, Time, Packet>
Sourcepub fn switch<Slice2: M, Time2: M>(
self,
config: SwitchConfig,
) -> SwitchTensor<'l, T, D, Chip, Cluster, Slice2, Time2, Packet>
pub fn switch<Slice2: M, Time2: M>( self, config: SwitchConfig, ) -> SwitchTensor<'l, T, D, Chip, Cluster, Slice2, Time2, Packet>
Performs switching operation to create a switched tensor.
Applies switching network routing only. The packet passes through
unchanged — no padding, no reshaping. Use SwitchTensor::collect
afterwards to normalize the packet to flit-sized chunks.
Sourcepub fn collect<Time2: M, Packet2: M>(
self,
) -> CollectTensor<'l, T, D, Chip, Cluster, Slice, Time2, Packet2>
pub fn collect<Time2: M, Packet2: M>( self, ) -> CollectTensor<'l, T, D, Chip, Cluster, Slice, Time2, Packet2>
Skips the switching network and goes directly to collect.
Slice and Time are preserved from fetch; only the packet is normalized to flit-sized chunks.
Source§impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionSwitch, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionSwitch, D, Chip, Cluster, Slice, Time, Packet>
Sourcepub fn collect<Time2: M, Packet2: M>(
self,
) -> CollectTensor<'l, T, D, Chip, Cluster, Slice, Time2, Packet2>
pub fn collect<Time2: M, Packet2: M>( self, ) -> CollectTensor<'l, T, D, Chip, Cluster, Slice, Time2, Packet2>
Normalizes packet to exactly 32 bytes (one flit).
Pads to flit-aligned boundary, then splits: inner 32 bytes become Packet2, outer flit portion is absorbed into Time2. For packets already ≤ 32 bytes, only padding is added.
Source§impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionCollect, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionCollect, D, Chip, Cluster, Slice, Time, Packet>
Sourcepub fn to_trf<Row: M, Element: M>(
self,
address: TrfAddress,
) -> TrfTensor<D, Chip, Cluster, Slice, Row, Element>
pub fn to_trf<Row: M, Element: M>( self, address: TrfAddress, ) -> TrfTensor<D, Chip, Cluster, Slice, Row, Element>
Stores to the tensor register file.
Sourcepub fn to_vrf<Element2: M>(
self,
address: Address,
) -> VrfTensor<D, Chip, Cluster, Slice, Element2>where
D: VeScalar,
pub fn to_vrf<Element2: M>(
self,
address: Address,
) -> VrfTensor<D, Chip, Cluster, Slice, Element2>where
D: VeScalar,
Stores to the vector register file.
Sourcepub fn vector_init(
self,
) -> VectorInitTensor<'l, T, D, Chip, Cluster, Slice, Time, Packet>where
D: VeScalar,
pub fn vector_init(
self,
) -> VectorInitTensor<'l, T, D, Chip, Cluster, Slice, Time, Packet>where
D: VeScalar,
Initializes Vector Engine processing for this tensor.
Sourcepub fn align<OutTime: M, OutPacket: M, Row: M, TrfElement: M>(
self,
trf_tensor: &TrfTensor<D, Chip, Cluster, Slice, Row, TrfElement>,
) -> AlignedPair<'l, T, D, Chip, Cluster, Slice, Row, OutTime, OutPacket>
pub fn align<OutTime: M, OutPacket: M, Row: M, TrfElement: M>( self, trf_tensor: &TrfTensor<D, Chip, Cluster, Slice, Row, TrfElement>, ) -> AlignedPair<'l, T, D, Chip, Cluster, Slice, Row, OutTime, OutPacket>
Aligns LHS stream (via Feed Buffer) and RHS TRF (via TRF Sequencer) to computation shape.
Sourcepub fn transpose<OutTime: M, OutPacket: M>(
self,
) -> TransposeTensor<'l, T, D, Chip, Cluster, Slice, OutTime, OutPacket>
pub fn transpose<OutTime: M, OutPacket: M>( self, ) -> TransposeTensor<'l, T, D, Chip, Cluster, Slice, OutTime, OutPacket>
Performs transpose operation.
Source§impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionContraction, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionContraction, D, Chip, Cluster, Slice, Time, Packet>
Sourcepub fn vector_init(
self,
) -> VectorInitTensor<'l, T, D, Chip, Cluster, Slice, Time, Packet>where
D: VeScalar,
pub fn vector_init(
self,
) -> VectorInitTensor<'l, T, D, Chip, Cluster, Slice, Time, Packet>where
D: VeScalar,
Initializes Vector Engine processing from contraction output.
Source§impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionVectorFinal, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, PositionVectorFinal, D, Chip, Cluster, Slice, Time, Packet>
Sourcepub fn to_vrf<Element: M>(
self,
address: Address,
) -> VrfTensor<D, Chip, Cluster, Slice, Element>where
D: VeScalar,
pub fn to_vrf<Element: M>(
self,
address: Address,
) -> VrfTensor<D, Chip, Cluster, Slice, Element>where
D: VeScalar,
Stores to the vector register file after VE pipeline.
Sourcepub fn transpose<Time2: M, Packet2: M>(
self,
) -> TransposeTensor<'l, T, D, Chip, Cluster, Slice, Time2, Packet2>
pub fn transpose<Time2: M, Packet2: M>( self, ) -> TransposeTensor<'l, T, D, Chip, Cluster, Slice, Time2, Packet2>
Performs transpose operation (transitions to Transpose engine).
Source§impl<'l, const T: Tu, P: Position, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, P, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, P: Position, D: Scalar, Chip: M, Cluster: M, Slice: M, Time: M, Packet: M> StreamTensor<'l, T, P, D, Chip, Cluster, Slice, Time, Packet>
Sourcepub fn commit<Element: M>(
self,
address: Address,
) -> DmTensor<D, Chip, Cluster, Slice, Element>
pub fn commit<Element: M>( self, address: Address, ) -> DmTensor<D, Chip, Cluster, Slice, Element>
Commits to the data memory.
Sourcepub fn commit_view<Element: M>(
self,
dst: DmTensorViewMut<'l, D, Chip, Cluster, Slice, Element>,
)
pub fn commit_view<Element: M>( self, dst: DmTensorViewMut<'l, D, Chip, Cluster, Slice, Element>, )
Commits to mutable tensor view in the data memory.
Trait Implementations§
Auto Trait Implementations§
impl<'l, const T: Tu, P, D, Chip, Cluster, Slice, Time, Packet> Freeze for StreamTensor<'l, T, P, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, P, D, Chip, Cluster, Slice, Time, Packet> RefUnwindSafe for StreamTensor<'l, T, P, D, Chip, Cluster, Slice, Time, Packet>where
P: RefUnwindSafe,
D: RefUnwindSafe,
Chip: RefUnwindSafe,
Cluster: RefUnwindSafe,
Slice: RefUnwindSafe,
Time: RefUnwindSafe,
Packet: RefUnwindSafe,
impl<'l, const T: Tu, P, D, Chip, Cluster, Slice, Time, Packet> Send for StreamTensor<'l, T, P, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, P, D, Chip, Cluster, Slice, Time, Packet> Sync for StreamTensor<'l, T, P, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, P, D, Chip, Cluster, Slice, Time, Packet> Unpin for StreamTensor<'l, T, P, D, Chip, Cluster, Slice, Time, Packet>
impl<'l, const T: Tu, P, D, Chip, Cluster, Slice, Time, Packet> !UnwindSafe for StreamTensor<'l, T, P, D, Chip, Cluster, Slice, Time, Packet>
Blanket Implementations§
§impl<T> AlignerFor<1> for T
impl<T> AlignerFor<1> for T
§impl<T> AlignerFor<1024> for T
impl<T> AlignerFor<1024> for T
§impl<T> AlignerFor<128> for T
impl<T> AlignerFor<128> for T
§impl<T> AlignerFor<16> for T
impl<T> AlignerFor<16> for T
§impl<T> AlignerFor<16384> for T
impl<T> AlignerFor<16384> for T
§impl<T> AlignerFor<2> for T
impl<T> AlignerFor<2> for T
§impl<T> AlignerFor<2048> for T
impl<T> AlignerFor<2048> for T
§impl<T> AlignerFor<256> for T
impl<T> AlignerFor<256> for T
§impl<T> AlignerFor<32> for T
impl<T> AlignerFor<32> for T
§impl<T> AlignerFor<32768> for T
impl<T> AlignerFor<32768> for T
§impl<T> AlignerFor<4> for T
impl<T> AlignerFor<4> for T
§impl<T> AlignerFor<4096> for T
impl<T> AlignerFor<4096> for T
§impl<T> AlignerFor<512> for T
impl<T> AlignerFor<512> for T
§impl<T> AlignerFor<64> for T
impl<T> AlignerFor<64> for T
§impl<T> AlignerFor<8> for T
impl<T> AlignerFor<8> for T
§impl<T> AlignerFor<8192> for T
impl<T> AlignerFor<8192> for T
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
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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>
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>
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 more§impl<S> ROExtAcc for S
impl<S> ROExtAcc for S
§fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
offset. Read more§fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
offset. Read more§fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
offset. Read more§fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
offset. Read more§impl<S> ROExtOps<Aligned> for S
impl<S> ROExtOps<Aligned> for S
§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
offset) with value,
returning the previous value of the field. Read more§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
§impl<S> ROExtOps<Unaligned> for S
impl<S> ROExtOps<Unaligned> for S
§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
offset) with value,
returning the previous value of the field. Read more§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
§impl<T> SelfOps for Twhere
T: ?Sized,
impl<T> SelfOps for Twhere
T: ?Sized,
§fn piped<F, U>(self, f: F) -> U
fn piped<F, U>(self, f: F) -> U
§fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
piped except that the function takes &Self
Useful for functions that take &Self instead of Self. Read more§fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
piped, except that the function takes &mut Self.
Useful for functions that take &mut Self instead of Self.§fn mutated<F>(self, f: F) -> Self
fn mutated<F>(self, f: F) -> Self
§fn observe<F>(self, f: F) -> Self
fn observe<F>(self, f: F) -> Self
§fn as_ref_<T>(&self) -> &T
fn as_ref_<T>(&self) -> &T
AsRef,
using the turbofish .as_ref_::<_>() syntax. Read more