OpenCL local memory exists on Mali/Adreno GPU

608 Views Asked by At
  1. Does OpenCL local memory really exist on Mali/Adreno GPU or they only exist in some special mobile phones?
  2. If they exist, in which case should we use local memory, such as GEMM/Conv or other cl kernel?
2

There are 2 best solutions below

6
On BEST ANSWER

Interesting question. OpenCL defines a number of conceptual memories including local memory, constant memory, global memory, and private memory. And physically as you know, the hardware implementation of these memories is hardware dependent. For instance, some may emulate local memory using cache or system memory instead of having physical memory.

AFAIK, ARM Mali GPU does not have local memory, whereas Qualcomm Adreno GPU does have local memory.

For instance below table shows the definition of each memory in OpenCL and their relative latency and physical locations in Adreno GPU cited from OpenCL Optimization and Best Practices for Qualcomm Adreno GPUs∗

enter image description here


Answer updated:

as commented by SK-logic below, Mali6xx have a local memory (shared with cache).

0
On

Memory is shared on recent Mali, not local, but OpenCL still has the concept of the memory being separate, so there are special commands to make sure there is no copying. Use of private/local memory is not recommended.

For more information on best use of memory with Mali OpenCL, please read:

https://developer.arm.com/documentation/101574/0400/Optimizing-OpenCL-for-Mali-GPUs/Optimizing-memory-allocation/About-memory-allocation?lang=en