ethereum-mining / ethminer

Ethereum miner with OpenCL, CUDA and stratum support
GNU General Public License v3.0
5.96k stars 2.28k forks source link

Vega 64 / gfx900 / gfx901 binary kernel reports false high hashrate and doesn't mine #2018

Open Jello opened 4 years ago

Jello commented 4 years ago

I have a Vega 64 Founder's Edition with 16GB of ram (gfx901). This is identified by the software as gfx900 (vega 64 8GB) and loads the ethash_gfx900_lws128_exit.bin. I've tried swapping this file for the gfx901 version, but the result is the same. The output hashrate is indicated as ~62Mh/s, but server side I see nothing. 62Mh/s is also much higher than would be expected for this graphics card, it should be around 42Mh/s.

Deleting the binary kernels provides a hash rate of about 26Mh/s using the OpenCL fallback.

My host OS is Ubuntu 18.04 on a 16GB system with a core i3 processor.

Build: linux/release/gnu

 i 20:27:20 ethminer Configured pool us-east.ethash-hub.miningpoolhub.com:20535
 i 20:27:20 ethminer Selected pool us-east.ethash-hub.miningpoolhub.com:20535
 i 20:27:20 ethminer Stratum mode : EthereumStratum/1.0.0 (NiceHash)
 i 20:27:20 ethminer Established connection to us-east.ethash-hub.miningpoolhub.com [18.204.40.75:20535]
 i 20:27:20 ethminer Spinning up miners...
cl 20:27:20 cl-0     Using Device : 03:00.0 gfx900 OpenCL 2.0 AMD-APP (3110.6) Memory : 15.98 GB (17163091968 B)
 i 20:27:20 cl-0     Adjusting CL work multiplier for 64 CUs. Adjusted work multiplier: 116,509
 i 20:27:20 ethminer Extranonce set to 0002
 i 20:27:20 ethminer Epoch : 354 Difficulty : 8.59 Gh
 i 20:27:20 ethminer Job: b6da647a… us-east.ethash-hub.miningpoolhub.com [18.204.40.75:20535]
 i 20:27:22 ethminer Authorized worker ...
cl 20:27:22 cl-0     Generating split DAG + Light (total): 3.77 GB
cl 20:27:22 cl-0     OpenCL kernel
 i 20:27:22 ethminer Job: 3c63fdab… us-east.ethash-hub.miningpoolhub.com [18.204.40.75:20535]
 i 20:27:22 ethminer Job: 680c2331… us-east.ethash-hub.miningpoolhub.com [18.204.40.75:20535]
 i 20:27:23 ethminer Job: 14209dda… us-east.ethash-hub.miningpoolhub.com [18.204.40.75:20535]
cl 20:27:23 cl-0     Loading binary kernel /usr/local/bin/kernels/ethash_gfx900_lws128_exit.bin
cl 20:27:23 cl-0     Build info success:
cl 20:27:23 cl-0     Creating DAG buffer, size: 3.77 GB, free: 12.22 GB
cl 20:27:23 cl-0     Creating light cache buffer, size: 60.25 MB
cl 20:27:23 cl-0     Loading kernels
cl 20:27:23 cl-0     Creating buffer for header.
cl 20:27:23 cl-0     Creating mining buffer
...
 m 20:30:50 ethminer 0:03 A0 61.86 Mh - cl0 61.86
 i 20:30:51 ethminer Job: c4fd8ed1… us-east.ethash-hub.miningpoolhub.com [18.204.40.75:20535]
 i 20:30:52 ethminer Job: d51f6d7f… us-east.ethash-hub.miningpoolhub.com [18.204.40.75:20535]
 i 20:30:52 ethminer Job: d8e9aaef… us-east.ethash-hub.miningpoolhub.com [18.204.40.75:20535]
 m 20:30:55 ethminer 0:03 A0 61.88 Mh - cl0 61.88
 i 20:30:55 ethminer Job: d4ed614a… us-east.ethash-hub.miningpoolhub.com [18.204.40.75:20535]
 i 20:30:58 ethminer Job: d4b18143… us-east.ethash-hub.miningpoolhub.com [18.204.40.75:20535]
 m 20:31:00 ethminer 0:03 A0 61.88 Mh - cl0 61.88
piluex commented 4 years ago

Same here for radeon vii, it reports 90mh/s but it never sends a share, if --cl-nobin is used then it mines @ 46 mh/s but it works.

piluex commented 4 years ago

I tried to review the ISA code and it's pretty darn bad. Very undocumented and hacky, it's unclear how that's expected to work reliably without a simple unit test. I'll try to fix it when I get some free time or to dump a kernel from one of those shady closed source probably stolen source miners.

jean-m-cyr commented 4 years ago

Those binary kernels stopped getting any attention long before the advent of the Radeon 7, nor do the folks that created them have any intention of wasting further time on them. ETH GPU mining is dead.

Eliovp commented 4 years ago

ETH GPU mining is dead.

The rock you're living under must be huge ... 🤦‍♂️

Jello commented 4 years ago

Those binary kernels stopped getting any attention long before the advent of the Radeon 7, nor do the folks that created them have any intention of wasting further time on them. ETH GPU mining is dead.

You're wrong, eth gpu mining is about as good as it's ever been. Eth GPU mining has spiked in profitability as of late due to high fees, and proof of stake is forever delayed. Additionally, large numbers of ASICs have lost the ability to mine due to the DAG size increasing.

Josevora commented 4 years ago

Deleting the binary kernels provides a hash rate of about 26Mh/s using the OpenCL fallback.

Do you get accepted shares? for that hashrate, stable over time?

I might be wrong here, but it looks to me that those fallback kernels are NOT optimized for the 2048 bits of memory you have... not a big deal tho, easy to hack... IF you are getting accepted shares anyway...

If not, it might take a major redesign of the kernel...

Josevora commented 3 years ago

Hum, guys... I've made some changes to the Kernel, but I'm still bottlenecked by something... I do get Accepted Shares... Is it a Driver problem? Have you looked into this?

lss4 commented 3 years ago

It seems the gfx906 kernel in the latest commits doesn't really work, either (note that release builds don't contain kernels for gfx906, only CI builds do). I get ~90MH/s on my Radeon VII with the kernel, but in reality no accepted shares at all.

Running ethminer without the kernel results in around 46MH/s but I can get accepted shares. On the other hand, I also have a Tonga card running on that system. The kernel for that card works, but I just confirmed that the actual hashrate is not much different with or without the kernel (10~11MH/s).

EDIT: It seems using these kernels may lead to system crashes. The system is more stable when ethminer is started without loading the kernels.