What is ALF?

The Accelerated Library Framework (ALF) provides a programming environment for data and task parallel applications and libraries. The ALF API provides you with a set of interfaces to simplify library development on heterogenous multi-core systems. You can use the provided framework to offload the computationally intensive work to the accelerators. More complex applications can be developed by combining the several function offload libraries. You can also choose to implement applications directly to the ALF interface.

ALF supports the multiple-program-multiple-data (MPMD) programming model where multiple programs can be scheduled to run on multiple accelerator elements at the same time.

The ALF functionality includes:

With the provided API, you can also create descriptions for multiple compute tasks and define their execution orders by defining task dependency. Task parallelism is accomplished by having tasks without direct or indirect dependencies between them. The ALF runtime provides an optimal parallel scheduling scheme for the tasks based on given dependencies.

ALF workload division

From the application or library programmer's point of view, ALF consists of the following two runtime components:
  • A host runtime library
  • An accelerator runtime library
The host runtime library provides the host APIs to the application. The accelerator runtime library provides the APIs to the application’s accelerator code, usually the computational kernel and helper routines. This division of labor enables programmers to specialize in different parts of a given parallel workload.

ALF tasks

The ALF design enables a separation of work. There are three distinct types of task within a given application:
Application
You develop programs only at the host level. You can use the provided accelerated libraries without direct knowledge of the inner workings of the underlying system.
Accelerated library
You use the ALF APIs to provide the library interfaces to invoke the computational kernels on the accelerators. You divide the problem into the control process, which runs on the host, and the computational kernel, which runs on the accelerators. You then partition the input and output into work blocks, which ALF can schedule to run on different accelerators.
Computational kernel
You write optimized accelerator code at the accelerator level. The ALF API provides a common interface for the compute task to be invoked automatically by the framework.

ALF runtime framework

The runtime framework handles the underlying task management, data movement, and error handling, which means that the focus is on the kernel and the data partitioning, and not on the direct memory access (DMA) list creation or management of the work queue.

The ALF APIs are platform-independent and their design is based on the fact that many applications targeted for Cell BE or multi-core computing follow the general usage pattern of dividing a set of data into self-contained blocks, creating a list of data blocks to be computed on the synergistic processing element (SPE), and then managing the distribution of that data to the various SPE processes. This type of control and compute process usage scenario, along with the corresponding work queue definition, are the fundamental abstractions in ALF.