fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

Unable to mine using AMD GPU #2406

Open akoul opened 5 years ago

akoul commented 5 years ago

So, I believe this has been asked around a lot, but, after spending 24+ hours trying to get around the problem, I have arrived nowhere. Here is hoping that the community helps in this:

Laptop specs: https://support.hp.com/us-en/document/c03599953

clinfo output:

`Number of platforms: 1 Platform Profile: FULL_PROFILE
Platform Version: OpenCL 2.0 AMD-APP (1800.8) Platform Name: AMD Accelerated Parallel Processing Platform Vendor: Advanced Micro Devices, Inc. Platform Extensions: cl_khr_icd cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_amd_event_callback cl_amd_offline_devices Platform Name: AMD Accelerated Parallel Processing Number of devices: 3
Device Type: CL_DEVICE_TYPE_GPU Vendor ID: 1002h
Board name: AMD Radeon HD 7640G Device Topology: PCI[ B#0, D#1, F#0 ]
Max compute units: 4
Max work items dimensions: 3
Max work items[0]: 256
Max work items[1]: 256
Max work items[2]: 256
Max work group size: 256
Preferred vector width char: 16 Preferred vector width short: 8
Preferred vector width int: 4
Preferred vector width long: 2
Preferred vector width float: 4
Preferred vector width double: 0
Native vector width char: 16
Native vector width short: 8
Native vector width int: 4
Native vector width long: 2
Native vector width float: 4
Native vector width double: 0
Max clock frequency: 654Mhz
Address bits: 32
Max memory allocation: 536870912
Image support: Yes
Max number of images read arguments: 128 Max number of images write arguments: 8
Max image 2D width: 16384
Max image 2D height: 16384
Max image 3D width: 2048
Max image 3D height: 2048
Max image 3D depth: 2048
Max samplers within kernel: 16
Max size of kernel argument: 1024 Alignment (bits) of base address: 2048 Minimum alignment (bytes) for any datatype: 128 Single precision floating point capability Denorms: No
Quiet NaNs: Yes
Round to nearest even: Yes
Round to zero: Yes
Round to +ve and infinity: Yes
IEEE754-2008 fused multiply-add: Yes
Cache type: None
Cache line size: 0
Cache size: 0
Global memory size: 1733033984 Constant buffer size: 65536
Max number of constant args: 8
Local memory type: Scratchpad
Local memory size: 32768
Max pipe arguments: 0
Max pipe active reservations: 0
Max pipe packet size: 0
Max global variable size: 0
Max global variable preferred total size: 0
Max read/write image args: 0
Max on device events: 0
Queue on device max size: 0
Max on device queues: 0
Queue on device preferred size: 0
SVM capabilities:
Coarse grain buffer: No
Fine grain buffer: No
Fine grain system: No
Atomics: No
Preferred platform atomic alignment: 0 Preferred global atomic alignment: 0 Preferred local atomic alignment: 0
Kernel Preferred work group size multiple: 64
Error correction support: 0
Unified memory for Host and Device: 1 Profiling timer resolution: 1
Device endianess: Little
Available: Yes
Compiler available: Yes
Execution capabilities:
Execute OpenCL kernels: Yes
Execute native function: No
Queue on Host properties:
Out-of-Order: No
Profiling : Yes
Queue on Device properties:
Out-of-Order: No

Profiling : No
Platform ID: 00007FF9A02BF180
Name: Devastator
Vendor: Advanced Micro Devices, Inc.
Device OpenCL C version: OpenCL C 1.2 Driver version: 1800.8 (VM)
Profile: FULL_PROFILE
Version: OpenCL 1.2 AMD-APP (1800.8) Extensions: cl_amd_fp64 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_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_amd_image2d_from_buffer_read_only cl_khr_spir cl_khr_gl_event Device Type: CL_DEVICE_TYPE_GPU Vendor ID: 1002h
Board name: AMD Radeon HD 7670M Device Topology: PCI[ B#1, D#0, F#0 ]
Max compute units: 6
Max work items dimensions: 3
Max work items[0]: 256
Max work items[1]: 256
Max work items[2]: 256
Max work group size: 256
Preferred vector width char: 16
Preferred vector width short: 8
Preferred vector width int: 4
Preferred vector width long: 2
Preferred vector width float: 4
Preferred vector width double: 0
Native vector width char: 16
Native vector width short: 8
Native vector width int: 4
Native vector width long: 2
Native vector width float: 4
Native vector width double: 0
Max clock frequency: 654Mhz
Address bits: 32
Max memory allocation: 536870912
Image support: Yes
Max number of images read arguments: 128 Max number of images write arguments: 8
Max image 2D width: 16384
Max image 2D height: 16384
Max image 3D width: 2048
Max image 3D height: 2048
Max image 3D depth: 2048
Max samplers within kernel: 16
Max size of kernel argument: 1024 Alignment (bits) of base address: 2048 Minimum alignment (bytes) for any datatype: 128 Single precision floating point capability Denorms: No
Quiet NaNs: Yes
Round to nearest even: Yes
Round to zero: Yes
Round to +ve and infinity: Yes
IEEE754-2008 fused multiply-add: Yes
Cache type: None
Cache line size: 0
Cache size: 0
Global memory size: 2147483648 Constant buffer size: 65536
Max number of constant args: 8
Local memory type: Scratchpad
Local memory size: 32768
Max pipe arguments: 0
Max pipe active reservations: 0
Max pipe packet size: 0
Max global variable size: 0`

**cpu.txt***** // generated by xmr-stak/2.10.4/a5b8fb741/master/win/nvidia-amd-cpu/20

/*

"cpu_threads_conf" : [ { "low_power_mode" : false, "no_prefetch" : true, "asm" : "auto", "affine_to_cpu" : 0 }, { "low_power_mode" : false, "no_prefetch" : true, "asm" : "auto", "affine_to_cpu" : 1 }, { "low_power_mode" : false, "no_prefetch" : true, "asm" : "auto", "affine_to_cpu" : 2 }, { "low_power_mode" : false, "no_prefetch" : true, "asm" : "auto", "affine_to_cpu" : 3 },

],

**amd.txt***

// generated by xmr-stak/2.10.4/a5b8fb741/master/win/nvidia-amd-cpu/20

/*

"gpu_threads_conf" : [ // gpu: Devastator compute units: 4 // memory:512|512|1524 MiB (used per thread|max per alloc|total free) { "index" : 0, "intensity" : 248, "worksize" : 8, "affine_to_cpu" : false, "strided_index" : 2, "mem_chunk" : 2, "unroll" : 8, "comp_mode" : true, "interleave" : 40 }, // gpu: Devastator compute units: 4 // memory:512|512|1524 MiB (used per thread|max per alloc|total free) { "index" : 0, "intensity" : 248, "worksize" : 8, "affine_to_cpu" : false, "strided_index" : 2, "mem_chunk" : 2, "unroll" : 8, "comp_mode" : true, "interleave" : 40 }, // gpu: Turks compute units: 6 // memory:512|512|1920 MiB (used per thread|max per alloc|total free) { "index" : 1, "intensity" : 248, "worksize" : 8, "affine_to_cpu" : false, "strided_index" : 2, "mem_chunk" : 2, "unroll" : 8, "comp_mode" : true, "interleave" : 40 }, // gpu: Turks compute units: 6 // memory:512|512|1920 MiB (used per thread|max per alloc|total free) { "index" : 1, "intensity" : 248, "worksize" : 8, "affine_to_cpu" : false, "strided_index" : 2, "mem_chunk" : 2, "unroll" : 8, "comp_mode" : true, "interleave" : 40 },

],

/*

/*

*config.txt***** // generated by xmr-stak/2.10.4/a5b8fb741/master/win/nvidia-amd-cpu/20

/*

/*

/*

/*

/*

/*

/*

/*

/*

/*

/*

I try running xmr-stack using ./xmr-stak --noCPU --noNVIDIA and here is my output:

[2019-04-11 01:06:40] : Mining coin: cryptonight_r [2019-04-11 01:06:40] : Compiling code and initializing GPUs. This will take a while... [2019-04-11 01:07:12] : Device 0 work size 8 / 32. [2019-04-11 01:07:12] : OpenCL device 0 - Load precompiled code from file C:\Users\AppData\Local/.openclcache/0472390cfc5df6aa62a4b1f14dfee5ecadf4f1fa3821ff304581e1409b943d89.openclbin [2019-04-11 01:07:13] : Device 0 work size 8 / 32. [2019-04-11 01:07:13] : OpenCL device 0 - Load precompiled code from file C:\Users\AppData\Local/.openclcache/0472390cfc5df6aa62a4b1f14dfee5ecadf4f1fa3821ff304581e1409b943d89.openclbin [2019-04-11 01:07:13] : Device 1 work size 8 / 32. [2019-04-11 01:07:14] : OpenCL device 1 - Load precompiled code from file C:\Users\AppData\Local/.openclcache/63c4f3fc3511c36f4752cf2c32943b0cb80712eab8174df04f5b3005d252cea4.openclbin [2019-04-11 01:07:14] : Device 1 work size 8 / 32. [2019-04-11 01:07:14] : OpenCL device 1 - Load precompiled code from file C:\Users\AppData\Local/.openclcache/63c4f3fc3511c36f4752cf2c32943b0cb80712eab8174df04f5b3005d252cea4.openclbin [2019-04-11 01:07:14] : Starting AMD GPU (OpenCL) thread 0, no affinity. [2019-04-11 01:07:14] : Starting AMD GPU (OpenCL) thread 1, no affinity. [2019-04-11 01:07:14] : Starting AMD GPU (OpenCL) thread 2, no affinity. [2019-04-11 01:07:14] : Starting AMD GPU (OpenCL) thread 3, no affinity. [2019-04-11 01:07:14] : Fast-connecting to pool ... [2019-04-11 01:07:14] : Pool connected. Logging in... [2019-04-11 01:07:15] : Difficulty changed. Now: 15000. [2019-04-11 01:07:15] : Pool logged in. [2019-04-11 01:07:47] : OpenCL Interleave 0|0: 1241/3105.10 ms - 40.1 [2019-04-11 01:07:48] : OpenCL Interleave 0|0: 1166/2919.09 ms - 40.1 [2019-04-11 01:07:50] : OpenCL Interleave 0|0: 1093/2744.38 ms - 40.1 [2019-04-11 01:07:51] : OpenCL Interleave 0|0: 836/2089.29 ms - 40.1 [2019-04-11 01:07:52] : OpenCL Interleave 0|0: 780/1964.66 ms - 40.1 [2019-04-11 01:07:52] : OpenCL Interleave 0|0: 739/1846.29 ms - 40.1 [2019-04-11 01:07:53] : OpenCL Interleave 0|0: 685/1736.66 ms - 40.1 [2019-04-11 01:07:54] : OpenCL Interleave 0|0: 636/1633.30 ms - 40.1 [2019-04-11 01:07:54] : OpenCL Interleave 1|0: 4246/10618.10 ms - 40.1 [2019-04-11 01:07:54] : OpenCL Interleave 0|0: 610/1534.07 ms - 40.1 [2019-04-11 01:07:55] : OpenCL Interleave 0|0: 563/1443.16 ms - 40.1 [2019-04-11 01:07:56] : OpenCL Interleave 0|0: 529/1356.64 ms - 40.1 [2019-04-11 01:07:56] : OpenCL Interleave 0|0: 508/1274.08 ms - 40.1 [2019-04-11 01:07:57] : OpenCL Interleave 0|0: 472/1198.27 ms - 40.1 [2019-04-11 01:07:57] : OpenCL Interleave 0|0: 439/1126.84 ms - 40.1 [2019-04-11 01:07:58] : OpenCL Interleave 0|0: 409/1059.56 ms - 40.1 [2019-04-11 01:07:58] : OpenCL Interleave 0|0: 387/995.70 ms - 40.1 [2019-04-11 01:07:58] : OpenCL Interleave 0|0: 356/936.73 ms - 40.1 [2019-04-11 01:07:59] : OpenCL Interleave 0|0: 348/879.06 ms - 40.1 [2019-04-11 01:07:59] : OpenCL Interleave 0|0: 320/827.05 ms - 40.1 [2019-04-11 01:08:00] : OpenCL Interleave 0|0: 303/777.15 ms - 40.1 [2019-04-11 01:08:00] : OpenCL Interleave 0|0: 282/730.83 ms - 40.1 [2019-04-11 01:08:00] : OpenCL Interleave 0|0: 261/687.35 ms - 40.1 [2019-04-11 01:08:00] : OpenCL Interleave 0|0: 254/645.12 ms - 40.1 [2019-04-11 01:08:01] : OpenCL Interleave 0|0: 231/607.20 ms - 40.1 [2019-04-11 01:08:01] : OpenCL Interleave 0|0: 224/569.98 ms - 40.1 [2019-04-11 01:08:01] : OpenCL Interleave 0|0: 205/536.39 ms - 40.1 [2019-04-11 01:08:01] : OpenCL Interleave 0|0: 188/504.65 ms - 40.1 [2019-04-11 01:08:02] : OpenCL Interleave 0|0: 175/474.48 ms - 40.1 [2019-04-11 01:08:02] : OpenCL Interleave 0|0: 157/446.73 ms - 40.1 [2019-04-11 01:08:02] : OpenCL Interleave 0|0: 162/418.26 ms - 40.1 [2019-04-11 01:08:02] : OpenCL Interleave 0|0: 147/393.63 ms - 40.1 [2019-04-11 01:08:02] : OpenCL Interleave 0|0: 139/369.87 ms - 40.1 [2019-04-11 01:08:02] : OpenCL Interleave 0|0: 137/346.98 ms - 40.1 [2019-04-11 01:08:03] : OpenCL Interleave 0|0: 127/326.29 ms - 40.1 [2019-04-11 01:08:03] : OpenCL Interleave 0|0: 109/307.76 ms - 40.1 [2019-04-11 01:08:03] : OpenCL Interleave 0|0: 100/289.48 ms - 40.1 [2019-04-11 01:08:03] : OpenCL Interleave 0|0: 99/271.43 ms - 40.1 [2019-04-11 01:08:03] : OpenCL Interleave 0|0: 91/255.29 ms - 40.1 [2019-04-11 01:08:03] : OpenCL Interleave 0|0: 92/239.16 ms - 40.1 [2019-04-11 01:08:03] : OpenCL Interleave 0|0: 73/226.14 ms - 40.1 [2019-04-11 01:08:03] : OpenCL Interleave 0|0: 79/211.33 ms - 40.1 [2019-04-11 01:08:03] : OpenCL Interleave 0|0: 65/199.60 ms - 40.1 [2019-04-11 01:08:03] : OpenCL Interleave 0|0: 62/187.44 ms - 40.1 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 54/176.49 ms - 40.1 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 57/165.14 ms - 40.1 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 57/154.83 ms - 40.0 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 53/145.55 ms - 40.0 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 44/137.29 ms - 40.0 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 33/129.76 ms - 40.0 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 34/121.49 ms - 40.0 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 32/114.04 ms - 40.0 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 27/107.33 ms - 40.0 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 35/99.70 ms - 40.0 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 25/94.43 ms - 40.0 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 29/88.09 ms - 40.0 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 29/82.48 ms - 39.9 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 28/77.33 ms - 39.9 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 26/72.70 ms - 39.9 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 21/68.63 ms - 39.9 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 15/64.87 ms - 39.9 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 20/53.99 ms - 39.9 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 13/48.02 ms - 39.9 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 14/44.82 ms - 39.9 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 14/41.94 ms - 39.8 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 13/39.34 ms - 39.8 [2019-04-11 01:08:04] : OpenCL Interleave 0|0: 12/36.91 ms - 39.8 [2019-04-11 01:08:26] : OpenCL Interleave 1|0: 4243/10584.52 ms - 40.1 [2019-04-11 01:08:40] : New block detected. [2019-04-11 01:08:47] : OpenCL Interleave 1|0: 4238/10572.99 ms - 40.1 [2019-04-11 01:08:58] : OpenCL Interleave 1|0: 4236/10566.53 ms - 40.1 [2019-04-11 01:10:01] : OpenCL Interleave 1|0: 4230/10551.44 ms - 40.1 [2019-04-11 01:10:22] : OpenCL Interleave 1|0: 4229/10548.99 ms - 40.1 [2019-04-11 01:10:40] : New block detected. [2019-04-11 01:10:54] : OpenCL Interleave 1|0: 4228/10547.64 ms - 40.1 [2019-04-11 01:11:04] : OpenCL Interleave 1|0: 4228/10548.56 ms - 40.0 [2019-04-11 01:11:36] : OpenCL Interleave 1|0: 4220/10554.06 ms - 40.0 [2019-04-11 01:12:08] : OpenCL Interleave 1|0: 4221/10556.98 ms - 40.0 HASHRATE REPORT - AMD | ID | 10s | 60s | 15m | ID | 10s | 60s | 15m | | 0 | 1025139.2 | 1099261.3 | (na) | 1 | (na) | (na) | (na) | | 2 | (na) | 23.5 | (na) | 3 | (na) | 23.5 | (na) | Totals (AMD): 1025139.2 1099308.2 0.0 H/s

Totals (ALL): 1025139.2 1099308.2 0.0 H/s Highest: 0.0 H/s

Spudz76 commented 5 years ago

Would expect it not to work without antique driver to match antique GPUs. Both are Terascale not even GCN1 (which also require old drivers). GCN2 ("Southern Islands") are about the first ones that actually still work correctly on (most) drivers including recent ones.

You look like windows so the driver you need is either this one however its a community reroll (since AMD abandoned these) and isn't signed so you might not want to disable all the whatever so it'll work.

In which case you need a 15.x or 13.x standard driver

HP actually offers a 13.152 for that exact model, try it. It probably works best. Win8.1 drivers should (mostly) load up fine on Win10 (usually).

I had ended up at a revision very close to that on Linux before I got my old Redwood to work properly.

Being a laptop and then also on top of that being a weird dual-gpu it is probably even more important to run what the manufacturer provides. Newer than 15 definitely never works anywhere. The hacked driver probably would be the best performance, IF it works with the special mobile rare thing you have. It has the last OpenCL that ever worked close to properly on TeraScale (15.201)

HP had a 15.201 package at some point (also not for this specific laptop) but they trashed it for some reason. Maybe given the file name there you could track down a copy, and then that might be the last best driver, and official HP even.

Spudz76 commented 5 years ago

Oh actually, they rerolled a really "new" one with the same old 15.201, cool, it might work

Spudz76 commented 5 years ago

The hacked driver will function, this post shows it works for 7670M

Spudz76 commented 5 years ago

Most of that thread says the newest repack is iffy and that 15.11.1-beta was the final driver with good OpenCL and everything (performance too)

That other pack is more for those using crossfire and openGL apparently

akoul commented 5 years ago

Tried installing both the drivers, but still the same. Unable to mine using GPUs. I get 0 hashes/sec even though it detects the block and sometimes I get Results accepted by the pool.

Spudz76 commented 5 years ago

Keep turning down intensity or worksize until stats work, if you have to have stats visible (pool side stats not good enough?) Work too intense for slow old card to report its work on time for stats. Especially the newer algos like CN-R there is too much calculation work, and new floating point restrictions, you have to drop the worksize to where it only uses like half or quarter the memory (not claim max memory like usual, where you have plenty of computation power to push the bandwidth). Or the delay of the slow ass computation will be too long for stats to catch the report (de-synchronized).

My old GPUs (nVidia Fermi) tend to run CN-Heavy variants well, or algos that don't have the newer extra float/sqrt/dev junk added (old GPU horrible at those things). Or, I let them have holes in their locally visible stats. But usually the pool side rates don't show any gain for running the card harder than it can run, so while turning down all the intensity/worksize feels wrong, it repairs the stats and smooths out everything and the pool side effective rate is about equal in the end.

I don't run old AMD (have a Redwood/ HD5xxx) though since 9 months ago that rig makes more money collecting dust. It was bad enough at the CN2V2 ("v8") fork, can't imagine its non-effectiveness with CN-R. Also was always Linux, Ubuntu 14.04 non-LTS only because anything newer doesn't work with 13 or 15 drivers (fglrx) and none of the newer drivers worked at all.