IRON
1.0
|
Public Member Functions | |
def | __init__ (self, Callable|None core_fn, list fn_args=[], PlacementTile|None placement=AnyComputeTile, bool while_true=True) |
None | place (self, Tile tile) |
list[ObjectFifoHandle] | fifos (self) |
list[GlobalBuffer] | buffers (self) |
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) |
PlacementTile|None | tile (self) |
Public Attributes | |
core_fn | |
fn_args | |
link_with | |
Static Public Attributes | |
current_core_placement | |
Private Attributes | |
_tile | |
_while_true | |
_fifos | |
_buffers | |
_summary_ Worker is an object that takes a `core_fn` and a set of arguments. A Worker must be placed on a Compute Core.
This variable is the current core if resolving() within the Worker, or None otherwise.
def iron.worker.Worker.__init__ | ( | self, | |
Callable | None | core_fn, | ||
list | fn_args = [] , |
||
PlacementTile | None | placement = AnyComputeTile , |
||
bool | while_true = True |
||
) |
Construct a Worker Args: core_fn (Callable | None): The task to run on a core. If None, a busy-loop (`while(true): pass`) core will be generated. fn_args (list, optional): Pointers to arguments, which should include all context the core_fn needs to run. Defaults to []. placement (PlacementTile | None, optional): The placcement for the Worker. Defaults to AnyComputeTile. while_true (bool, optional): If true, will wrap the core_fn in a while(true) loop to ensure it runs until reconfiguration. Defaults to True. Raises: ValueError: Parameters are validated.
list[GlobalBuffer] iron.worker.Worker.buffers | ( | self | ) |
Returns a list of GlobalBuffers given to the Worker via fn_args. Returns: list[GlobalBuffer]: GlobalBuffers used by the Worker.
list[ObjectFifoHandle] iron.worker.Worker.fifos | ( | self | ) |
Returns a list of ObjectFifoHandles given to the Worker via fn_args. Returns: list[ObjectFifoHandle]: ObjectFifoHandles used by the Worker.
None iron.worker.Worker.place | ( | self, | |
Tile | tile | ||
) |
Set the placement of the Worker. Args: tile (Tile): The placement location.
Reimplemented from iron.placeable.Placeable.
None iron.worker.Worker.resolve | ( | self, | |
ir.Location | None | loc = None , |
||
ir.InsertionPoint | None | ip = None |
||
) |
|
private |
|
private |
|
private |
|
private |
iron.worker.Worker.core_fn |
|
static |
iron.worker.Worker.fn_args |
iron.worker.Worker.link_with |