Description
System is a Mac Mini M1 with 16 GB memory, building in arm64 mode
Using the XMRIG miner and activated OpenCL with RandomX. Failed with this error:
[SNIP]
[2021-05-04 12:38:53.070] cpu use argon2 implementation default
[2021-05-04 12:38:53.070] randomx init dataset algo rx/0 (8 threads) seed 7d658366894bda88...
[2021-05-04 12:38:53.070] randomx allocated 2336 MB (2080+256) huge pages 0% 0/1168 +JIT (0 ms)
[2021-05-04 12:39:01.629] randomx dataset ready (8558 ms)
[2021-05-04 12:39:01.631] opencl use profile rx (1 thread) scratchpad 2048 KB
| # | GPU | BUS ID | INTENSITY | WSIZE | MEMORY | NAME
| 0 | 0 | n/a | 128 | 8 | 256 | Apple M1
[2021-05-04 12:39:01.632] opencl GPU #0 compiling...
UNSUPPORTED (log once): buildComputeProgram: cl2Metal failed
[2021-05-04 12:39:01.821] 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'
#define update_max(value, next_value) do { if ((value) < (next_value)) (value) = (next_value); } while (0)
[2021-05-04 12:39:01.822] opencl thread #0 self-test failed~~~~~~
[2021-05-04 12:39:01.822] opencl disabled (failed to start threads)
My question is twofold:
- The signed vs unsigned comparison doesn't appear to be significant, therefore I should be able to solve this by casting the
uint32_t
toint32_t
without any side effects, right? - The source code module appears to be
randomx_vm.cl
but if I change this module to add the casts and rebuild, the new code is not used. Even if I first remove the contents of thebuild
directory.