|
IRON 1.0
|


Public Member Functions | |
| __init__ (self, Callable|None core_fn, list fn_args=[], PlacementTile|None placement=AnyComputeTile, bool while_true=True, int stack_size=None, str allocation_scheme=None, int trace=None, list trace_events=None) | |
| 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 | |
| PlacementTile|None | tile (self) |
Public Attributes | |
| stack_size | |
| allocation_scheme | |
| trace | |
| trace_events | |
| core_fn | |
| fn_args | |
| link_with | |
Static Public Attributes | |
| current_core_placement | |
Protected Attributes | |
| _tile | |
| _while_true | |
| _fifos | |
| _buffers | |
| _barriers | |
Protected Attributes inherited from iron.placeable.Placeable | |
| _tile | |
_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.
| iron.worker.Worker.__init__ | ( | self, | |
| Callable | None | core_fn, | ||
| list | fn_args = [], |
||
| PlacementTile | None | placement = AnyComputeTile, |
||
| bool | while_true = True, |
||
| int | stack_size = None, |
||
| str | allocation_scheme = None, |
||
| int | trace = None, |
||
| list | trace_events = None |
||
| ) |
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 placement 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.
stack_size (int, optional): The stack_size in bytes to be allocated for the worker. Defaults to 1024 bytes.
allocation_scheme (str, optional): The memory allocation scheme to use for the Worker, either 'basic-sequential' or 'bank-aware'. If None, defaults to bank-aware.
Will override any allocation scheme set on the tile given as placement.
trace (int, optional): If >0, enable tracing for this worker.
Raises:
ValueError: Parameters are validated.
Reimplemented from iron.placeable.Placeable.
| 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 |
||
| ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| iron.worker.Worker.allocation_scheme |
| iron.worker.Worker.core_fn |
|
static |
| iron.worker.Worker.fn_args |
| iron.worker.Worker.link_with |
| iron.worker.Worker.stack_size |
| iron.worker.Worker.trace |
| iron.worker.Worker.trace_events |