4.4 Debugging an OpenCL application

Graphics Analyzer supports the capture of OpenCL applications on Arm Linux, in addition to OpenGL ES and Vulkan.

OpenCL capturing is a part of the interceptor library and does not require any special installation. Because it is not a graphics API, there are a few things to bear in mind when debugging OpenCL with Graphics Analyzer.

When you start or open an OpenCL capture, you are prompted to launch the OpenCL perspective. This perspective adjusts the visible views to only those views that are supported for OpenCL. For more information, see 5.1 Perspectives.

The Assets view tracks and displays contexts, kernels, memory objects, and programs. Graphics Analyzer tracks the relationship between memory objects and subbuffers, which are displayed in the Assets view. Graphics Analyzer warns you about dangerous overlapping subbuffers.

Note:

Graphics Analyzer tracks memory that is initialized into any memory object, using the CL_MEM_USE_HOST_PTR flag. It also tracks calls to clEnqueueCopyBuffer and clEnqueueWriteBuffer. However, Graphics Analyzer does not support sending changes to mapped OpenCL memory, or changes to memory caused by kernel invocations. Therefore the memory reported in Graphics Analyzer might not accurately reflect your application.

Because there are no conceptual frames in OpenCL, the Trace Outline assigns all function calls to Frame 0 and Render Pass 0. The Trace Outline view displays the following function calls:

  1. Function calls that enqueue commands.
  2. Function calls that block queued commands.
  3. clFlush() and clFinish() function calls, which issue command queues to a device.

Blocking calls tell you how long they blocked for, and also the size of the wait list passed into the function call, if applicable.

Non-Confidential - RELPDF file icon PDF version101545__00_en
Copyright © 2020–2022, 2024 Arm Limited or its affiliates. All rights reserved.