To get OpenCL running on the N2 I had to add the following link.
Code: Select all
cd /usr/lib/aarch64-linux-gnu
ln -s libMali.so libOpenCL.so
Code: Select all
sudo apt install clinfo
sudo mkdir /etc/OpenCL
sudo mkdir /etc/OpenCL/vendors
sudo vi /etc/OpenCL/vendors/mali.icd
add
libOpenCL.so
Code: Select all
Number of platforms 1
Platform Name ARM Platform
Platform Vendor ARM
Platform Version OpenCL 2.0 git.c8adbf9.122c9daed32dbba4b3056f41a2f23c58
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_create_command_queue cl_arm_core_id cl_arm_printf cl_arm_thread_limit_hint cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_shared_virtual_memory
Platform Extensions function suffix ARM
Platform Name ARM Platform
Number of devices 1
Device Name Mali-G52
Device Vendor ARM
Device Vendor ID 0x72120000
Device Version OpenCL 2.0 git.c8adbf9.122c9daed32dbba4b3056f41a2f23c58
Driver Version 2.0
Device OpenCL C Version OpenCL C 2.0 git.c8adbf9.122c9daed32dbba4b3056f41a2f23c58
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 2
Max clock frequency 750MHz
Device Partition (core)
Max number of sub-devices 0
Supported partition types None
Max work item dimensions 3
Max work item sizes 384x384x384
Max work group size 384
Preferred work group size multiple 8
Preferred / native vector sizes
char 16 / 4
short 8 / 2
int 4 / 1
long 2 / 1
half 8 / 2 (cl_khr_fp16)
float 4 / 1
double 0 / 0 (n/a)
Half-precision Floating-point support (cl_khr_fp16)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Single-precision Floating-point support (core)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
Double-precision Floating-point support (n/a)
Address bits 64, Little-Endian
Global memory size 3888140288 (3.621GiB)
Error Correction support No
Max memory allocation 972035072 (927MiB)
Unified memory for Host and Device Yes
Shared Virtual Memory (SVM) capabilities (core)
Coarse-grained buffer sharing Yes
Fine-grained buffer sharing No
Fine-grained system sharing No
Atomics No
Shared Virtual Memory (SVM) capabilities (ARM)
Coarse-grained buffer sharing Yes
Fine-grained buffer sharing No
Fine-grained system sharing No
Atomics No
Minimum alignment for any data type 128 bytes
Alignment of base address 1024 bits (128 bytes)
Preferred alignment for atomics
SVM 0 bytes
Global 0 bytes
Local 0 bytes
Max size for global variable 65536 (64KiB)
Preferred total size of global vars 0
Global Memory cache type Read/Write
Global Memory cache size 131072 (128KiB)
Global Memory cache line size 64 bytes
Image support Yes
Max number of samplers per kernel 16
Max size for 1D images from buffer 65536 pixels
Max 1D or 2D image array size 2048 images
Base address alignment for 2D image buffers 32 bytes
Pitch alignment for 2D image buffers 64 pixels
Max 2D image size 65536x65536 pixels
Max 3D image size 65536x65536x65536 pixels
Max number of read image args 128
Max number of write image args 64
Max number of read/write image args 64
Max number of pipe args 16
Max active pipe reservations 1
Max pipe packet size 1024
Local memory type Global
Local memory size 32768 (32KiB)
Max number of constant args 8
Max constant buffer size 65536 (64KiB)
Max size of kernel argument 1024
Queue properties (on host)
Out-of-order execution Yes
Profiling Yes
Queue properties (on device)
Out-of-order execution Yes
Profiling Yes
Preferred size 2097152 (2MiB)
Max size 16777216 (16MiB)
Max queues on device 1
Max events on device 1024
Prefer user sync for interop No
Profiling timer resolution 1000ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
printf() buffer size 1048576 (1024KiB)
Built-in kernels
Device Extensions cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_create_command_queue cl_arm_core_id cl_arm_printf cl_arm_thread_limit_hint cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_shared_virtual_memory
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) ARM Platform
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [ARM]
clCreateContext(NULL, ...) [default] Success [ARM]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name ARM Platform
Device Name Mali-G52
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name ARM Platform
Device Name Mali-G52
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
Platform Name ARM Platform
Device Name Mali-G52
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.11
ICD loader Profile OpenCL 2.1
XU4 – Active air cooled, Split AirFlow Case with 80mm ducted fan
Linux odroid-xu4 4.14.102-156 #1 SMP PREEMPT Thu Feb 21 14:15:08 -03 2019 armv7l armv7l armv7l GNU/Linux
GCC 7.3
CFLAGS="-Ofast -Wall -std=gnu99 -march=armv7-a -mtune=cortex-a15.cortex-a7 -fexpensive-optimizations -fprefetch-loop-arrays -mfpu=neon -I/opt/arm_compute-v18.11-bin-linux/include/CL" LDFLAGS="-L/opt/arm_compute-v18.11-bin-linux/lib/linux-armv7a-neon-cl" ./configure --disable-adl –disable-adl-checks
N1 – Active air cooled, stock
Linux odroid-n1 4.4.114 #1 SMP Thu Sep 6 21:26:15 EDT 2018 aarch64 GNU/Linux
GCC 6.3
CFLAGS="-Ofast -Wall -march=armv8-a+crypto -mtune=cortex-a72.cortex-a53 -fexpensive-optimizations -fprefetch-loop-arrays -std=gnu99 -I/opt/arm_compute-v18.11-bin-linux/include/CL" LDFLAGS="-L/opt/arm_compute-v18.11-bin-linux/lib/linux-arm64-v8a-neon-cl" ./configure --disable-git-version --disable-adl --disable-adl-checks
N2 - Passive heatsink, stock
Linux odroid-n2 4.9.156-14 #1 SMP PREEMPT Sat Feb 16 02:15:44 -02 2019 aarch64 aarch64 aarch64 GNU/Linux
GCC 7.3
CFLAGS="-Ofast -Wall -march=armv8-a+crypto -mtune=cortex-a73.cortex-a53 -fexpensive-optimizations -fprefetch-loop-arrays -std=gnu99 -I/opt/arm_compute-v18.11-bin-linux/include/CL" LDFLAGS="-L/opt/arm_compute-v18.11-bin-linux/lib/linux-arm64-v8a-neon-cl" ./configure --disable-git-version --disable-adl –disable-adl-checks
The SBCs ran for a little over an hour with the following average Kilohash/s results I also recorded the system and GPU temperatures for the Odroid N2 during the test. I spent a fair amount of time tuning GPU parameters. I have the most experience with the XU4's Mali T-628 so most of the time was spent on the N2 and the N1. As a general observation the N2’s Mali G52 was a pleasure to work with and It didn’t take long to find the sweet spot were it was stable and sustainable. The bad boy out of the group is definitely the N1’s Mali T-860. I struggled to get it to perform near the XU4’s performance. This isn’t something new either. From the first time I started working with it a year ago, getting it to operate at or near the XU4, regardless of the algorithm, has been a challenge. Even considering it’s running an older kernel, compiler and drivers I feel the N1’s Mali T860 should do better. For this test I could get it to run in the 70-73 Kilohash/s range but it’s just not sustainable over the long run.
The N2’s Mali G52’s range during tuning could punch up to 103-110 Kilohash/s but could not be sustained. It runs relatively cool and comfortable at 98-99 Kilohash/s, considering it’s passive heatsink and affords a nice increase in performance to it’s closest competitor. Overall I’m very pleased with its performance and happy from a hardware perspective that HK waited for the S922X with it’s Mali G52. In between testing I’ve been running the N2 as a thin desktop with good experiences and looking forward to the new drivers that are in the works.