|
IRON a504a6293388f5b9de1cd9dfb7aea06a86754c3e
|


Public Member Functions | |
| __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) |
| op (self) | |
| __getitem__ (self, idx) | |
| __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 | |
| None | place (self, Tile tile) |
| PlacementTile|None | tile (self) |
Protected Attributes | |
| _initial_value | |
| _name | |
| _op | |
| _arr_type | |
| _use_write_rtp | |
Protected Attributes inherited from iron.placeable.Placeable | |
| _tile | |
Private Member Functions | |
| int | __get_index (cls) |
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.
| iron.buffer.Buffer.__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 Buffer 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: If neither ``type`` nor ``initial_value`` is provided.
Reimplemented from iron.placeable.Placeable.
|
private |
| iron.buffer.Buffer.__getitem__ | ( | self, | |
| idx | |||
| ) |
| iron.buffer.Buffer.__setitem__ | ( | self, | |
| idx, | |||
| source | |||
| ) |
| np.dtype iron.buffer.Buffer.dtype | ( | self | ) |
The per-element datatype of the buffer.
| iron.buffer.Buffer.op | ( | self | ) |
| None iron.buffer.Buffer.resolve | ( | self, | |
| 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.buffer.Buffer.shape | ( | self | ) |
The shape of the buffer
|
staticprivate |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |