Task

A task is defined as a ready-to-be-scheduled instantiation of a task description or you use the num_instances parameter in the task creation function (alf_task_create), to explicitly request a number of accelerators or let the ALF runtime decide the necessary number of accelerators to run the compute task. You can also provide the data for the context buffer associated with this particular task.

You can also register an event handler to monitor different task events, see Task events.

After you have created a task, you can create work blocks and enqueue the work blocks on to the working queue associated with the task. The ALF framework employs an immediate runtime mode. After a work block has been enqueued, if the task has no unresolved dependency on other tasks, the task is scheduled to process the work blocks.

For information about work blocks, see Work blocks.