|
def | __init__ (self, ObjectFifo of, bool is_prod, int|None depth=None, list[Sequence[int]]|None dims_from_stream=None) |
|
list | acquire (self, int num_elem) |
|
None | release (self, int num_elem) |
|
str | name (self) |
|
ObjectFifoCreateOp | op (self) |
|
type[np.ndarray] | obj_type (self) |
|
Sequence[int] | shape (self) |
|
np.dtype | dtype (self) |
|
str | handle_type (self) |
|
int | depth (self) |
|
list[Sequence[int]] | dims_from_stream (self) |
|
ObjectFifoEndpoint|None | endpoint (self) |
|
str | __str__ (self) |
|
None | endpoint (self, ObjectFifoEndpoint endpoint) |
|
list[ObjectFifoEndpoint] | all_of_endpoints (self) |
|
list[ObjectFifo] | join (self, list[int] offsets, PlacementTile placement=AnyMemTile, list[int]|None depths=None, list[type[np.ndarray]] obj_types=None, list[str]|None names=None, list[list[Sequence[int]|None]]|None dims_to_stream=None, list[list[Sequence[int]|None]]|None dims_from_stream=None, bool plio=False) |
|
list[ObjectFifo] | split (self, list[int] offsets, PlacementTile placement=AnyMemTile, list[int]|None depths=None, list[type[np.ndarray]] obj_types=None, list[str]|None names=None, list[list[Sequence[int]]]|None dims_to_stream=None, list[list[Sequence[int]]]|None dims_from_stream=None, bool plio=False) |
|
ObjectFifo | forward (self, PlacementTile placement=AnyMemTile, type[np.ndarray]|None obj_type=None, int|None depth=None, str|None name=None, list[Sequence[int]]|None dims_to_stream=None, list[Sequence[int]]|None dims_from_stream=None, bool plio=False) |
|
None | resolve (self, ir.Location|None loc=None, ir.InsertionPoint|None ip=None) |
|
This class represents a handle to an ObjectFifo. A handle may be of type Producer or type Consumer.
ObjectFifo iron.dataflow.objectfifo.ObjectFifoHandle.forward |
( |
|
self, |
|
|
PlacementTile |
placement = AnyMemTile , |
|
|
type[np.ndarray] | None |
obj_type = None , |
|
|
int | None |
depth = None , |
|
|
str | None |
name = None , |
|
|
list[Sequence[int]] | None |
dims_to_stream = None , |
|
|
list[Sequence[int]] | None |
dims_from_stream = None , |
|
|
bool |
plio = False |
|
) |
| |
This is a special case of the split() operation where an ObjectFifoHandle of type consumer
is forwarded to the producer of a newly-constructed ObjectFifo.
Args:
placement (PlacementTile, optional): The placement of the Forward operation. Defaults to AnyMemTile.
obj_type (type[np.ndarray] | None, optional): The object type of the new ObjectFifo. Defaults to None.
depth (int | None, optional): The depth of the new ObjectFifo. Defaults to None.
name (str | None, optional): The name of the new ObjectFifo. If None is given, a unique name will be generated. Defaults to None.
dims_to_stream (list[Sequence[int]] | None, optional): The dimensions to stream for the new ObjectFifo. Defaults to None.
dims_from_stream (list[Sequence[int]] | None, optional): The dimensions from stream for the new ObjectFifo. Defaults to None.
plio (bool, optional): Set plio on each new ObjectFifo. Defaults to False.
Raises:
ValueError: Arguments are Validated
Returns:
ObjectFifo: A newly constructed ObjectFifo whose producer used in this forward() operation.
list[ObjectFifo] iron.dataflow.objectfifo.ObjectFifoHandle.join |
( |
|
self, |
|
|
list[int] |
offsets, |
|
|
PlacementTile |
placement = AnyMemTile , |
|
|
list[int] | None |
depths = None , |
|
|
list[type[np.ndarray]] |
obj_types = None , |
|
|
list[str] | None |
names = None , |
|
|
list[list[Sequence[int] | None]] | None |
dims_to_stream = None , |
|
|
list[list[Sequence[int] | None]] | None |
dims_from_stream = None , |
|
|
bool |
plio = False |
|
) |
| |
Construct multiple ObjectFifos which feed data into a ObjectFifoHandle.
Note that this function is only valid for producer ObjectFifoHandles.
Args:
offsets (list[int]): Offsets into the current producer, each corresponding to a new consumer.
placement (PlacementTile, optional): The placement where the Join operation occurs. Defaults to AnyMemTile.
depths (list[int] | None, optional): The depth of each new ObjectFifo. Defaults to None.
obj_types (list[type[np.ndarray]], optional): The type of the buffers corresponding to each new ObjectFifo. Defaults to None.
names (list[str] | None, optional): The name of each new ObjectFifo. If not given, unique names will be generated. Defaults to None.
dims_to_stream (list[list[Sequence[int] | None]] | None, optional): The dimensionsToStream to assign to each new ObjectFifo. Defaults to None.
dims_from_stream (list[list[Sequence[int] | None]] | None, optional): The dimensionsFromStream to assign to each new ObjectFifo consumer. Defaults to None.
plio (bool, optional): Set plio on each new ObjectFifo. Defaults to False.
Raises:
ValueError: Arguments are validated
Returns:
list[ObjectFifo]: A list of newly constructed ObjectFifos whose consumers are used in this join() operation.
list[ObjectFifo] iron.dataflow.objectfifo.ObjectFifoHandle.split |
( |
|
self, |
|
|
list[int] |
offsets, |
|
|
PlacementTile |
placement = AnyMemTile , |
|
|
list[int] | None |
depths = None , |
|
|
list[type[np.ndarray]] |
obj_types = None , |
|
|
list[str] | None |
names = None , |
|
|
list[list[Sequence[int]]] | None |
dims_to_stream = None , |
|
|
list[list[Sequence[int]]] | None |
dims_from_stream = None , |
|
|
bool |
plio = False |
|
) |
| |
Split the data from an ObjectFifoConsumer handle by sending it to producers in N newly constructed ObjectFifos.
Note this operation is only valid for ObjectFifoHandles of type consumer.
Args:
offsets (list[int]): The offset into the current consumer for each new ObjectFifo producer.
placement (PlacementTile, optional): The placement tile where the Split operation takes place. Defaults to AnyMemTile.
depths (list[int] | None, optional): The depth of each new ObjectFifo. Defaults to None.
obj_types (list[type[np.ndarray]], optional): The buffer type of each new ObjectFifo. Defaults to None.
names (list[str] | None, optional): The name of each new ObjectFifo. If not given, a unique name will be generated. Defaults to None.
dims_to_stream (list[list[Sequence[int]]] | None, optional): The dimensions to stream for each new ObjectFifo. Defaults to None.
dims_from_stream (list[list[Sequence[int]]] | None, optional): The dimensions from stream for each new ObjectFifo. Defaults to None.
plio (bool, optional): Set plio on each new ObjectFifo. Defaults to False.
Raises:
ValueError: Arguments are validated.
Returns:
list[ObjectFifo]: A list of newly constructed ObjectFifos whose producers are used in this split() operation.