About binary formats

Because the history of the OpenCL for AMD GPU's is enough complicated and chaotic, I decided to write about used binary formats for the OpenCL programs.

All of these binary formats based on the Unix ELF binary format which widely used in the Linux/Unix systems for storing executables, code objects and shared libraries.

GPU drivers

The new opensource (the almost components) platform for High Performance Computing. Mainly, It is designed for high end hardware. This platform requires PCIExpress with PCIE atomics.

Binary formats

Now, we have four the various binary formats in usage:

Bitness of the binary formats

Because these format can be used in both 32-bit and 64-bit environment, we describe what these bitness for particular binary format means. Table of the bitness:

Binary format Format bitness Memory access bitness
AMD OpenCL 1.2 32/64-bit 32/64-bit
AMD OpenCL 2.0 32/64-bit 32/64-bit
GalliumCompute 32/64-bit 64-bit
ROCm 64-bit 64-bit

Format bitness - bitness of the same binary format.
Memory address bitness - bitness of the memory access.

The kernel's call conventions (ABI)

The various drivers uses various kernel's call convention. The kernel call convetion encompass the kernel argument's passinhg, the kernel setup (global offset, work size, work group size) passing and way to pass constant data. We call this as ABI. The all drivers uses various call conventions. For example the machine code (only instructions) for the AMD OpenCL 1.2 does not work under AMD OpenCL 2.0. Moreover the old GalliumCompute does not work under new GalliumCompute with AMD HSA.

This is list of call conventions (ABI):

CLRXCLHelper

The additional library CLRXCLHelper automatically determines the binary format, the bitness, the GPU device and the driver version from given the OpenCL device.