Overview of Arm Mali GPU Microarchitectures

For mobile devices, the GPU’s image processing capability is a benchmark for measuring a phone’s performance. First, there’s the smoothness of the UI; when people get a new phone, they swipe around to see if the UI is smooth, which primarily relies on GPU rendering. Secondly, there’s the smoothness of gaming; for visually stunning games, the GPU is currently the only high-performance 3D accelerator on mobile devices.

Overview of Arm Mali GPU Microarchitectures

On mobile devices, the mainstream GPUs include PowerVR, Mali, and Adreno. Apple initially used a customized version of PowerVR, but with the development of their own GPU, PowerVR can now be considered sold to Unisoc; Mali is the renowned graphics acceleration IP from ARM; Adreno is Qualcomm’s graphics GPU. However, this is not a performance comparison of these GPUs, but rather a brief introduction to the Mali GPU series.

Overview of Arm Mali GPU Microarchitectures

Mali is actually the IP core series from Arm, but many people online refer to Mali simply as the Mali GPU. The Mali series also includes video and display controllers, cameras, etc. However, Mali is considered one of the most widely licensed. Moreover, the GPU is more recognizable to non-industry individuals.1. Mali’s First Architecture: Utgard The first generation microarchitecture, Utgard (named after a character in Norse mythology), was released relatively early and mainly serves as a graphics acceleration IP. It can be traced back to the mali-200 from 2007. However, what is most surprising is the mali-4xx series, which is still used in many TV chips today. For example, Xiaomi’s smart TVs often use the mali-4xx series.

Overview of Arm Mali GPU Microarchitectures

In the Utgard generation, the vertex shader and fragment shader are separate, and the official OpenGL ES supported by ARM only maintained up to 2.0. Therefore, apps requiring OpenGL ES 3.0 and above cannot run. Furthermore, OpenCL is also not supported in this generation, as this generation focuses on graphics computation and does not support general-purpose computation. Mobile GPUs mainly use tile-based computation, and the entire Mali series (as of now) is based on tile-based computation. This can be simply understood as dividing an image into several small rectangles during computation, each rectangle being a tile, and then performing simultaneous calculations on each tile.

Main series include: mali-200, mali-400, mali-450, mali-470

2. Mali’s Second Architecture: Midgard The second generation microarchitecture, Midgard (named after another character in Norse mythology), began to unify the shader architecture, meaning that the vertex shader and fragment shader are now combined, allowing the same shader compute unit to handle multiple types of shaders. It also started to support general-purpose computation significantly, especially with OpenCL support boosting general-purpose computation. Although OpenGLES 3.1 introduced compute shaders, OpenCL is clearly more specialized for general-purpose computation.

Overview of Arm Mali GPU Microarchitectures

This architecture is based on 128-bit vectors, so when programming, it is often best to use 4 floats to maximize its performance. Of course, the compiler can also merge certain computable operations into vectors for calculation, but it’s best to optimize during coding. Compiler optimization can be difficult to control. Moreover, it is not recommended to program using more than 128 bits, as the compiler will need to break it down into multiple operations, with each number’s width being a maximum of 128 bits; if the compiler does not optimize well, it may lead to performance degradation.

Main series include: mali-t6xx, mali-t7xx, mali-t8xx

3. Mali’s Third Architecture: Bifrost The third generation microarchitecture, Bifrost (named after the rainbow bridge connecting the heavens and the earth in Norse mythology), was released after 2016, and since OpenGLES stabilized around that time, there was not much need for adjustment in graphics computation compared to Midgard.

Overview of Arm Mali GPU Microarchitectures

In Bifrost (which resembles SIMT mode; this SIMT description is derived from multiple document analyses), vectors are first broken down into scalars, and then each thread runs the first dimension of the multi-dimensional vector. Therefore, for a 3D vector (vec3), it only requires 3 cycles at most, and for a 4D vector (vec4), it requires 4 cycles at most. The term “fastest” is used here because not all instructions are single-cycle. Of course, while the Bifrost architecture performs scalar operations, this is for 32-bit widths; if it’s 16-bit widths, one thread can handle a vec2 of 16-bit data in one cycle. Therefore, when programming, if dealing with 8-bit or 16-bit data, one should consider how to organize the code for more efficient combined operations. For example, in 16-bit cases, it’s best to use vec2, and for 8-bit, use vec4 as much as possible. In Bifrost, for instance, with the G76, a shader core can run dozens of threads simultaneously. According to Mali’s documentation, a shader core generally consists of three parts: ALU, L/S, and TEXTURE modules. On the G76, it is 8-wide wrap, typically set to 3 ALUs. (Other models may differ; for example, G51/G72 is 4-wide wrap, and G72 also has 3 ALUs; G52 is similar to G76 but can be configured to have 2 ALUs.) For AI acceleration, some series have modified instructions, such as G52 and G76 introducing int8 dot instructions, which optimize operations for neural convolution networks.

Main series include: mali-g31, mali-g51, mali-g71, mali-g52, mali-g72, mali-g76

4. Mali’s Fourth Architecture: Valhall The fourth generation microarchitecture, Valhall, was launched in the second quarter of 2019. This series is based on a superscalar implementation. The G77 uses a 16-wide wrap, and a single shader core integrates two computing engines.

Overview of Arm Mali GPU Microarchitectures

Main series include: mali-g57, mali-g77

Finally, this article briefly outlines some aspects of the Mali GPU architecture and provides a brief description of the computing resources across different architectures. I hope this information is useful to readers. I will continue to study the resource configurations of individual series and even individual chips. Thank you for your attention. At the same time, I must express my frustration that the naming of Mali series chips does not distinguish between the Bifrost and Valhall series, especially as of the cutoff date (2020.03.15). It is challenging to differentiate the last two models, mali-g51, mali-g71, mali-g52, mali-g72, mali-g57, mali-g77 as belonging to the Valhall architecture. I am unsure how Mali considered this naming, which is quite puzzling.This article is translated from:https://developer.arm.com/architectures/media-architectures/gpu-architecture

Read Original Jump to Previous Embedded A I Newsletter Special

Leave a Comment