4.5.14. 3D GPU Performance Test
4.5.14.1. Test Principles
3D GPU performance testing is primarily used to evaluate GPU performance under various computing and rendering tasks. Depending on different GPU application scenarios, common tests include:
OpenGLES (rendering performance test): Use glmark2 for testing, evaluating GPU graphics rendering capabilities such as geometry processing, texture filling, and shader performance.
OpenCL (computing performance test): Use clpeak for testing, evaluating GPU performance in general-purpose computing (GPGPU) tasks such as floating-point computation, memory bandwidth, and integer computation.
4.5.14.2. Test Preparation
Executable test programs are included by default in the BSP image. You can
cdto the following path to check:cd /app/platform_samples/chip_base_test/11_gpu_3d_test/ ls clpeak clpeak Readme.md source-code-patch ls glmark2 bin data Readme.md run.sh source-code-patch
For custom images, copy the directory from the BSP source code path
/app/platform_samples/chip_base_test/11_gpu_3d_testto the device.
4.5.14.3. Test Methods
Rendering Performance Test Method
Connect a display to observe the 3D GPU rendering output:
The program defaults to HDMI display.
To switch to DSI, modify the command in the run.sh script to:
./bin/glmark2 --data-path ./data -c DSI
Execute run.sh
cd glmark2 ./run.sh
Output results as follows:
Warning: DRM_CAP_ASYNC_PAGE_FLIP not supported, falling back to 'mailbox' mode for SwapInterval(0).
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: Vivante Corporation
GL_RENDERER: Vivante GC8000L
GL_VERSION: OpenGL ES 3.1 V6.4.14.9.674707
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
Surface Size: 1920x1080 fullscreen
=======================================================
[build] use-vbo=false: FPS: 105 FrameTime: 9.588 ms
[build] use-vbo=true: FPS: 121 FrameTime: 8.324 ms
[texture] texture-filter=nearest: FPS: 121 FrameTime: 8.326 ms
[texture] texture-filter=linear: FPS: 121 FrameTime: 8.332 ms
[texture] texture-filter=mipmap: FPS: 121 FrameTime: 8.332 ms
[shading] shading=gouraud: FPS: 121 FrameTime: 8.325 ms
[shading] shading=blinn-phong-inf: FPS: 121 FrameTime: 8.333 ms
[shading] shading=phong: FPS: 120 FrameTime: 8.334 ms
[shading] shading=cel: FPS: 121 FrameTime: 8.332 ms
[bump] bump-render=high-poly: FPS: 121 FrameTime: 8.332 ms
[bump] bump-render=normals: FPS: 120 FrameTime: 8.334 ms
[bump] bump-render=height: FPS: 121 FrameTime: 8.332 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 91 FrameTime: 11.097 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 52 FrameTime: 19.438 ms
[pulsar] light=false:quads=5:texture=false: FPS: 120 FrameTime: 8.385 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 44 FrameTime: 23.077 ms
[desktop] effect=shadow:windows=4: FPS: 56 FrameTime: 18.121 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 60 FrameTime: 16.675 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 60 FrameTime: 16.670 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 90 FrameTime: 11.113 ms
[ideas] speed=duration: FPS: 73 FrameTime: 13.862 ms
[jellyfish] <default>: FPS: 91 FrameTime: 11.066 ms
[terrain] <default>: FPS: 10 FrameTime: 106.800 ms
[shadow] <default>: FPS: 120 FrameTime: 8.337 ms
[refract] <default>: FPS: 27 FrameTime: 37.329 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 121 FrameTime: 8.329 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 90 FrameTime: 11.122 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 120 FrameTime: 8.343 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 120 FrameTime: 8.336 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 105 FrameTime: 9.603 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 120 FrameTime: 8.337 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 120 FrameTime: 8.335 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 120 FrameTime: 8.345 ms
=======================================================
glmark2 Score: 97
=======================================================
Computing Performance Test Method
Execute the command:
cd clpeak ./clpeak
Output results as follows:
root@buildroot:/userdata# ./clpeak Platform: Vivante OpenCL Platform Device: Vivante OpenCL Device GC8000L.6214.0148 Driver version : OpenCL 3.0 V6.4.14.9.674707 (Linux ARM64) Compute units : 1 Clock frequency : 996 MHz Global memory bandwidth (GBPS) float : 4.15 float2 : 7.60 float4 : 11.27 float8 : 10.08 float16 : 6.33 Single-precision compute (GFLOPS) float : 7.96 float2 : 15.86 float4 : 31.50 float8 : 31.20 float16 : 30.96 Half-precision compute (GFLOPS) half : 15.90 half2 : 31.65 half4 : 62.74 half8 : 62.14 half16 : 60.41 No double precision support! Skipped Integer compute (GIOPS) int : 7.96 int2 : 15.81 int4 : 15.75 int8 : 15.60 int16 : 15.51 Integer compute Fast 24bit (GIOPS) int : 7.96 int2 : 15.81 int4 : 15.75 int8 : 15.60 int16 : 15.51 Integer char (8bit) compute (GIOPS) char : 15.86 char2 : 31.31 char4 : 61.07 char8 : 59.73 char16 : 58.65 Integer short (16bit) compute (GIOPS) short : 15.86 short2 : 31.31 short4 : 61.07 short8 : 59.72 short16 : 58.65 Transfer bandwidth (GBPS) enqueueWriteBuffer : 2.30 enqueueReadBuffer : 1.39 enqueueWriteBuffer non-blocking : 4.40 enqueueReadBuffer non-blocking : 4.09 enqueueMapBuffer(for read) : 4260.88 memcpy from mapped ptr : 0.12 enqueueUnmap(after write) : 5390.27 memcpy to mapped ptr : 4.31 Kernel launch latency : 50.17 us
4.5.14.4. Test Metrics
Rendering Performance Metrics
Higher FPS (frames per second) values in the test results indicate better GPU performance in that test scenario. Below is a line-by-line analysis of the test results:
General Rendering Tests
| Test Item | FPS | Description |
|---|---|---|
| use-vbo=false | 105 | Performance without using VBO (Vertex Buffer Object) |
| use-vbo=true | 121 | Using VBO reduces CPU-GPU data transfer and improves FPS |
| texture-filter=nearest/linear/mipmap | 121 | Texture sampling methods have almost no impact on performance |
| shading=gouraud/phong/blinn-phong-inf/cel | 120~121 | Shader computational complexity has minimal impact |
| bump-render=high-poly/normals/height | 120~121 | Techniques like normal mapping have little noticeable impact |
Complex Computation Tests
| Test Item | FPS | Description |
|---|---|---|
| effect2d (convolution kernel filtering) | 91 / 52 | 2D computational tasks such as Gaussian blur show lower performance |
| desktop (window blur/shadow) | 44 / 56 | Complex UI effects impact GPU processing capability |
| buffer (large-scale data update) | 60 / 90 | Data transfer mode affects performance |
| ideas (particle system) | 73 | High object complexity within the scene |
| jellyfish (jellyfish simulation) | 91 | Tests GPU computation and animation rendering capability |
| terrain (terrain rendering) | 10 | High terrain complexity, insufficient GPU processing power |
| refract (refraction) | 27 | Refraction computation is complex, resulting in lower performance |
Computational Tests
| Test Item | FPS | Description |
|---|---|---|
| conditionals (branching computation) | 90~121 | Strong GPU capability in executing conditional branching computations |
| function (fragment computation with increasing complexity) | 105~120 | Fragment computation tasks executed well |
| loop (loop computation) | 120 | High efficiency in GPU execution of loop computations |
Computing Performance Metrics
Memory Bandwidth (GBPS)
float : 4.15
float2 : 7.60
float4 : 11.27
float8 : 10.08
float16 : 6.33
Memory bandwidth first increases and then decreases with vector size, with float4 achieving the highest bandwidth performance.
This may be influenced by cache structure or memory access patterns.
Single-Precision Compute Performance (GFLOPS)
float : 7.96
float2 : 15.86
float4 : 31.50
float8 : 31.20
float16 : 30.96
Single-precision floating-point compute performance increases with vector size but stabilizes at float8 and above.
Low compute capability may result from a limited number of GPU compute units (only 1 Compute Unit).
Half-Precision Compute Performance (GFLOPS)
half : 15.90
half2 : 31.65
half4 : 62.74
half8 : 62.14
half16 : 60.41
Half-precision compute performance is higher than single-precision, as expected.
In applications such as AI inference, half-precision compute is typically used to improve throughput.
Integer Compute Performance (GIOPS)
int : 7.96
int2 : 15.81
int4 : 15.75
int8 : 15.60
int16 : 15.51
Integer compute performance is similar to single-precision floating-point compute.
May be limited by SIMD compute units and cache architecture.
Transfer Bandwidth (GBPS)
enqueueWriteBuffer : 2.30
enqueueReadBuffer : 1.39
enqueueWriteBuffer non-blocking : 4.40
enqueueReadBuffer non-blocking : 4.09
enqueueMapBuffer(for read) : 4260.88
memcpy from mapped ptr : 0.12
enqueueUnmap(after write) : 5390.27
memcpy to mapped ptr : 4.31
Low memory access efficiency (enqueueWriteBuffer only 2.30 GBPS).
Non-blocking transfers show significant improvement over blocking transfers; data transfer strategy optimization is recommended.
Map/Unmap mechanism is extremely fast, but memcpy is affected by CPU performance, resulting in lower actual throughput.
Kernel Launch Latency
Kernel launch latency : 50.17 us
High kernel launch latency, possibly due to driver scheduling or OpenCL runtime overhead.
Could create performance bottlenecks in real-time computing applications (e.g., computer vision); reducing kernel call frequency is recommended.
4.5.14.5. Common Issues
Rendering performance test fails to execute
Issue description: Error log as follows
glmark2# ./run.sh
start insmod display module related drivers ...
Opened DRM module 'vs-drm'
Error: Failed to find a suitable connector
Error: main: Could not initialize canvas
./run.sh: line 13: 1482 Segmentation fault (core dumped) ./bin/glmark2 --data-path ./data
Problem analysis: No suitable display connector was found.
Solution: Connect an HDMI or DSI display.