|
IRON 1.0
|


Public Member Functions | |
| __init__ (self, type[np.ndarray]|None type=None, np.ndarray|None initial_value=None, str|None name=None) | |
Private Member Functions | |
| int | __get_index (cls, Tile placement) |
Static Private Attributes | |
| __buf_tile_index = defaultdict(int) | |
A LocalBuffer will generate a BufferOp; it is called a LocalBuffer because it should only be initialized within a function given to a Worker.
This is used to ensure default names are uniquely given within a design
| iron.localbuffer.LocalBuffer.__init__ | ( | self, | |
| type[np.ndarray] | None | type = None, |
||
| np.ndarray | None | initial_value = None, |
||
| str | None | name = None |
||
| ) |
Initialize a LocalBuffer. Placement will be set to the current core.
Args:
type (type[np.ndarray] | None, optional): The tensor type representing the buffer to allocate. Defaults to None.
initial_value (np.ndarray | None, optional): An initial value of the buffer. The type of this should match the given type. Defaults to None.
name (str | None, optional): The name of the buffer. If None is given, one will be autogenerated. Defaults to None.
Raises:
ValueError: Arguments are validated.
|
private |
|
staticprivate |