What Is an OpenCL Processing Element?

The OpenCL execution hierarchy structures parallel computing across multiple levels of abstraction, with the processing element serving as the smallest, indivisible execution unit at the bottom of this model. This article examines how the processing element fits into the OpenCL architecture, its direct relationship to individual work-items, its interaction with private memory, and how physical hardware vendors map this logical concept onto actual compute cores and ALUs.

The OpenCL Platform and Device Model

OpenCL defines a formal hierarchy to abstract heterogeneous hardware, spanning multi-core CPUs, GPUs, digital signal processors, and field-programmable gate arrays. At the top level, a host system controls one or more OpenCL devices. Each OpenCL device is partitioned into one or more compute units, and each compute unit contains one or more processing elements.

While a compute unit manages scheduling, synchronization, and shared resources for a cluster of parallel tasks, the processing element is the underlying entity responsible for executing the individual operations of a kernel.

Logical Work-Items and Processing Elements

To understand a processing element, one must understand how OpenCL divides computational work. When a host program enqueues a kernel, it defines an N-dimensional index space called the NDRange. Each point within this NDRange represents a single concurrent instance of the kernel known as a work-item.

A processing element is the virtual hardware entity that executes a work-item. Multiple work-items are grouped together into a work-group. In parallel, the hardware compute unit contains multiple processing elements that work cooperatively on the work-items belonging to that work-group. Thus, the processing element is the precise locus where a work-item's instruction stream executes.

Memory Model Association

OpenCL's execution hierarchy directly mirrors its memory hierarchy. The processing element has unique access characteristics within this structure:

Because private memory is tied to the life cycle of a work-item executing on a processing element, registers and low-level cache lines typically satisfy these storage requirements on physical hardware.

Physical Hardware Realization

The OpenCL specification maintains a strictly logical abstraction, meaning that what physically constitutes a processing element depends entirely on the target architecture:

Regardless of the underlying hardware vendor, the processing element remains OpenCL's fundamental abstraction for the hardware resource that drives an individual work-item through its execution path.