Monday, February 12, 2018

Running Monero miner with Mesa clover

Try to run Monero miner with OpenCL on my old Linux rig.  The xmr-stak supports the official AMD APP SDK.  But since I only have access to the relatively old hardware (AMD Kabini) running Mesa clover, a quick patch is needed to make it works.

Code changes available on github.  Basically the changes are:

(1) add detection for Mesa platform vendor
(2) modify the OpenCL kernel.  Mesa clover supports OpenCL 1.1 only.  Also, although cl_amd_media_ops and cl_amd_media_ops2 are defined, some functions are missing and need definitions.

Just for reference, on my AMD Kabini 5350, the hash rate on GPU is around 18H/s when running GPU only.  Once added CPU mining, the GPU hash rate drops to about 12H/s.  And the CPU hash rate is round 28H/s.

This rig definitely not suitable if mining for profit.  But OK to support the Monero network.

Config for GPU:
gpu_threads_conf" : [
  // gpu: AMD KABINI (DRM 2.50.0 / 4.14.15-2-default, LLVM 5.0.1) memory:1302
  // compute units: 2
  { "index" : 0,
    "intensity" : 128, "worksize" : 8,
    "affine_to_cpu" : true, "strided_index" : true
  },

],

Also note that the radeon module may complain about lockup when executing long running OpenCL kernels. Add "radeon.lockup_timeout=0" Linux kernel parameter to disable the watchdog.

No comments:

Post a Comment