Page 1 of 1

error CL_BUILD_PROGRAM_FAILURE when calling clBuildProgram (XMRig Apple ARM)

Posted: Tue Jun 22, 2021 1:52 am
by macminergod
Tried enabling CUDA in XMRig/6.12.2 clang/12.0.5 under macOS Big Sur on a MacBook Air (M1, 2020). It does not compile for us.


XMRig shows the Apple MacBook Air M1 GPU as: #0 n/a Apple M1 1000 MHz cu:8 mem:1024/10922 MB

Opencl Xmrig Apple Arm M1 Macbook Air
Opencl Xmrig Apple Arm M1 Macbook Air (77.91 KiB) Viewed 7275 times
* OPENCL #0 Apple/OpenCL 1.2 (May 8 2021 03:14:28)
* OPENCL GPU #0 n/a Apple M1 1000 MHz cu:8 mem:1024/10922 MB
Xmrig Opencal Macbook Air M1 Intensity Wsize Memory Apple M1
Xmrig Opencal Macbook Air M1 Intensity Wsize Memory Apple M1 (62.51 KiB) Viewed 7275 times
| # | GPU | BUS ID | INTENSITY | WSIZE | MEMORY | NAME
| 0 | 0 | n/a | 128 | 8 | 256 | Apple M1

[2021-06-21 20:36:45.778] opencl GPU #0 compiling...
UNSUPPORTED (log once): buildComputeProgram: cl2Metal failed
[2021-06-21 20:36:46.072] opencl error CL_BUILD_PROGRAM_FAILURE when calling clBuildProgram
BUILD LOG:
Compilation failed:

program_source:1736:1: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int'
update_max(latency,(last_memory_op_slot+WORKERS_PER_HASH)/WORKERS_PER_HASH);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
program_source:1347:56: note: expanded from macro 'update_max'
#define update_max(value, next_value) do { if ((value) < (next_value)) (value) = (next_value); } while (0)
~~~~~ ^ ~~~~~~~~~~
program_source:1759:1: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int'
update_max(first_allowed_slot,latency*WORKERS_PER_HASH);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
program_source:1347:56: note: expanded from macro 'update_max'
[2021-06-21 20:36:46.072] opencl thread #0 failed with error CL_INVALID_PROGRAM
[2021-06-21 20:36:46.073] opencl thread #0 self-test failed