A task to be run on an AIE compute core.
A Worker takes a ``core_fn`` callable and the arguments it needs (ObjectFIFO handles,
Buffers, Kernels, etc.). Each Worker is placed on a single compute tile, either
explicitly via ``tile`` or automatically by the ``--aie-place-tiles`` compiler pass.
| iron.worker.Worker.__init__ |
( |
|
self, |
|
|
Callable | None |
core_fn, |
|
|
list |
fn_args = [], |
|
|
Tile |
tile = AnyComputeTile, |
|
|
bool |
while_true = True, |
|
|
int |
stack_size = None, |
|
|
str |
allocation_scheme = None, |
|
|
int |
trace = None, |
|
|
list |
trace_events = None, |
|
|
bool | None |
dynamic_objfifo_lowering = 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 [].
tile (Tile, optional): The compute tile 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.
trace (int, optional): If >0, enable tracing for this worker.
trace_events (list | None, optional): Custom list of trace events for this worker. Defaults to None.
dynamic_objfifo_lowering (bool | None, optional): Per-core override for the
``aie-objectFifo-stateful-transform`` pass's lowering choice. ``True`` forces
dynamic (loop-preserving) lowering for this core; ``False`` forces static
LCM-based unrolling. ``None`` (default) leaves the choice to the compiler's
global ``--dynamic-objFifos`` flag. Note: the per-core attribute is only
honored when the global flag is ``false``; when global is ``true`` the
attribute is ignored. Defaults to None.
Raises:
ValueError: Parameters are validated.
Reimplemented from iron.dataflow.endpoint.ObjectFifoEndpoint.