IRON
1.0
|
Public Member Functions | |
def | __init__ (self, type[np.ndarray]|None type=None, np.ndarray|None initial_value=None, str|None name=None, PlacementTile|None placement=None, bool use_write_rtp=False) |
Sequence[int] | shape (self) |
np.dtype | dtype (self) |
def | __getitem__ (self, idx) |
def | __setitem__ (self, idx, source) |
None | resolve (self, ir.Location|None loc=None, ir.InsertionPoint|None ip=None) |
Public Member Functions inherited from iron.placeable.Placeable | |
def | __init__ (self, PlacementTile|None tile) |
None | place (self, Tile tile) |
PlacementTile|None | tile (self) |
Private Member Functions | |
int | __get_index (cls) |
Private Attributes | |
_initial_value | |
_name | |
_op | |
_arr_type | |
_use_write_rtp | |
Static Private Attributes | |
int | __gbuf_index = 0 |
A buffer that is available both to Workers and to the Runtime for operations. This is often used for Runtime Parameters.
This is used to generate unique names if none is given during construction
def iron.globalbuffer.GlobalBuffer.__init__ | ( | self, | |
type[np.ndarray] | None | type = None , |
||
np.ndarray | None | initial_value = None , |
||
str | None | name = None , |
||
PlacementTile | None | placement = None , |
||
bool | use_write_rtp = False |
||
) |
A GlobalBuffer is a memory region declared at the top-level of the design, allowing it to be accessed by both Workers and the Runtime. Args: type (type[np.ndarray] | None, optional): The type of the buffer. Defaults to None. initial_value (np.ndarray | None, optional): An initial value to set the buffer to. Should be of same datatype and shape as the buffer. Defaults to None. name (str | None, optional): The name of the buffer. If none is given, a unique name will be generated. Defaults to None. placement (PlacementTile | None, optional): A placement location for the buffer. Defaults to None. use_write_rtp (bool, optional): If use_write_rtp, write_rtp/read_rtp operations will be generated. Otherwise, traditional write/read operations will be used. Defaults to False. Raises: ValueError: Arguments are validated.
|
private |
def iron.globalbuffer.GlobalBuffer.__getitem__ | ( | self, | |
idx | |||
) |
def iron.globalbuffer.GlobalBuffer.__setitem__ | ( | self, | |
idx, | |||
source | |||
) |
np.dtype iron.globalbuffer.GlobalBuffer.dtype | ( | self | ) |
The per-element datatype of the buffer.
None iron.globalbuffer.GlobalBuffer.resolve | ( | cls, | |
ir.Location | None | loc = None , |
||
ir.InsertionPoint | None | ip = None |
||
) |
Resolve the current object into one or more MLIR operations. Should only be called within an MLIR context. Args: loc (ir.Location | None, optional): Location is used by MLIR object during construction in some cases. Defaults to None. ip (ir.InsertionPoint | None, optional): InsertionPoint is used by MLIR object during construction in some cases. Defaults to None.
Reimplemented from iron.resolvable.Resolvable.
Sequence[int] iron.globalbuffer.GlobalBuffer.shape | ( | self | ) |
The shape of the buffer
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |