OpenCL mode

The Open Computing Language, or OpenCL, is a framework for parallel execution of jobs or kernels using task-based and data-based parallelism. OpenCL mode provides a visual representation of OpenCL code running on Arm® Mali devices.

Note

  • OpenCL mode is only available on platforms with an OpenCL timeline compiled into the Mali driver. Contact your platform provider or Arm Technical Support for more details.

  • The information in this topic applies to job manager GPUs up to version r42. CSF-based GPUs from DDK version r43p0 use Mali Timeline events to capture OpenCL data. Jobs are placed in one Custom Activity Map (CAM) track for the compute queue instead of categorizing them as shown in OpenCL mode. For more information, see Enable Mali Timeline Events.

This mode shows which command is being run on each thread over the course of the capture session.

To enable OpenCL mode, you must create an instrumentation configuration file. For details of the options it must contain, see the documentation that is supplied with the Mali Driver Development Kit (DDK).

OpenCL mode

In OpenCL, commands are added to queues, then execute in parallel on one of the available hardware devices. Commands in a queue execute in series, but commands can also depend on the completion of commands in other queues.

Command names are shown inside colored areas, representing the duration of their execution. If there are two or more commands in a bin, and there is enough room, the number of commands in the bin appears in light gray.

Clicking a command gives it focus and hides any non-relevant information. The following figure shows a selected command that is highlighted with a yellow border.

Selecting a command in OpenCL mode

Zoom out to see more commands and the points at which they were enqueued.

Zooming out in OpenCL mode

Hovering over a command displays a tooltip that shows the command name, the time that it was initiated, and its duration.

OpenCL mode tooltip

There is a filter field at the bottom of the chart in OpenCL mode. Enter a regex in the field and OpenCL mode updates, showing only matching commands.

Filtering in OpenCL mode