Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCN optimized code for RandomX #270

Merged
merged 5 commits into from
Aug 14, 2019
Merged

GCN optimized code for RandomX #270

merged 5 commits into from
Aug 14, 2019

Conversation

SChernykh
Copy link
Contributor

@SChernykh SChernykh commented Aug 13, 2019

Optimized code works only on Vega and Polaris GPUs with Adrenaline drivers (Windows) or amdgpu-pro drivers (Linux). Vega 64 (1700/1100 MHz) does 1283 h/s on rx/test, 1296 h/s on rx/wow, 1124 h/s on rx/loki.

@xmrig xmrig merged commit 85339fa into xmrig:evo Aug 14, 2019
@Bathmat
Copy link

Bathmat commented Aug 15, 2019

Tested and working on Polaris (RX470/570/480/580) in Win10.
Core/Mem: 1200/2000
Hashrate: rx/loki: 350-390 h/s. rx/wow: 420-450 h/s

Used 1 thread per gpu. Tried various intensities to get the best result. More testing to follow.

@SChernykh
Copy link
Contributor Author

@Bathmat there is a bug with 2 threads per GPU in this pull request - it allocates dataset 2 times, that's why it doesn't work on 4 GB GPUs and works poorly on 8 GB GPUs. I'll fix it soon.

@Bathmat
Copy link

Bathmat commented Aug 15, 2019

@Bathmat there is a bug with 2 threads per GPU in this pull request - it allocates dataset 2 times, that's why it doesn't work on 4 GB GPUs and works poorly on 8 GB GPUs. I'll fix it soon.

That would explain why it was crashing when I tried 2 threads. Thanks. I just thought it was RandomX design to not be able to use 2 threads.

@SChernykh
Copy link
Contributor Author

@Bathmat can you try #271 with 2 threads per GPU? Try to find the best intensity, it's not always the highest possible.

@Bathmat
Copy link

Bathmat commented Aug 16, 2019

Dual thread working now. Approx 7-8% boost in hashrate for rx/loki, 15-20% boost for rx/wow.
rx/loki: 410-474 h/s
rx/wow: 474-544 h/s

I just took the intensities I was using for single thread and halved them. So for rx/loki, I was using 768 for 470/570 and 864 for 480. For rx/wow, I was using double rx/loki, i.e., 1536 for 470/570 and 1728 for 480.

Anything over 832 total intensity would crash/very poor hashrate for 470/570 on rx/loki.
Driver: 19.5.2

@Bathmat
Copy link

Bathmat commented Aug 16, 2019

rx/loki

[2019-08-15 19:36:23] #00, GPU #00 Radeon RX 570 Series (Ellesmere), i:384 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:36:23]              0.75/3.75/4 GB
[2019-08-15 19:36:23] #01, GPU #00 Radeon RX 570 Series (Ellesmere), i:384 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:36:23]              0.75/3.75/4 GB
[2019-08-15 19:36:23] #02, GPU #01 Radeon (TM) RX 470 Graphics (Ellesmere), i:384 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:36:23]              0.75/3.75/4 GB
[2019-08-15 19:36:23] #03, GPU #01 Radeon (TM) RX 470 Graphics (Ellesmere), i:384 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:36:23]              0.75/3.75/4 GB
[2019-08-15 19:36:23] #04, GPU #02 Radeon (TM) RX 470 Graphics (Ellesmere), i:384 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:36:23]              0.75/3.75/4 GB
[2019-08-15 19:36:23] #05, GPU #02 Radeon (TM) RX 470 Graphics (Ellesmere), i:384 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:36:23]              0.75/3.75/4 GB
[2019-08-15 19:36:24] #06, GPU #03 Radeon (TM) RX 480 Graphics (Ellesmere), i:432 (8/256), si:1/2, u:8, cu:36
[2019-08-15 19:36:24]              0.84/3.75/4 GB
[2019-08-15 19:36:24] #07, GPU #03 Radeon (TM) RX 480 Graphics (Ellesmere), i:432 (8/256), si:1/2, u:8, cu:36
[2019-08-15 19:36:24]              0.84/3.75/4 GB
| THREAD | GPU | 10s H/s | 60s H/s | 15m H/s |
|      0 |   0 |   210.7 |     n/a |     n/a |
|      1 |   0 |   210.6 |     n/a |     n/a |
|      2 |   1 |   205.3 |     n/a |     n/a |
|      3 |   1 |   205.0 |     n/a |     n/a |
|      4 |   2 |   211.8 |     n/a |     n/a |
|      5 |   2 |   211.9 |     n/a |     n/a |
|      6 |   3 |   237.5 |     n/a |     n/a |
|      7 |   3 |   237.5 |     n/a |     n/a |
[2019-08-15 19:37:02] speed 10s/60s/15m 1730.3 n/a n/a H/s max 1722.6 H/s

@Bathmat
Copy link

Bathmat commented Aug 16, 2019

rx/wow

[2019-08-15 19:41:36] #00, GPU #00 Radeon RX 570 Series (Ellesmere), i:768 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:41:36]              1.50/3.75/4 GB
[2019-08-15 19:41:36] #01, GPU #00 Radeon RX 570 Series (Ellesmere), i:768 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:41:36]              1.50/3.75/4 GB
[2019-08-15 19:41:36] #02, GPU #01 Radeon (TM) RX 470 Graphics (Ellesmere), i:768 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:41:36]              1.50/3.75/4 GB
[2019-08-15 19:41:37] #03, GPU #01 Radeon (TM) RX 470 Graphics (Ellesmere), i:768 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:41:37]              1.50/3.75/4 GB
[2019-08-15 19:41:37] #04, GPU #02 Radeon (TM) RX 470 Graphics (Ellesmere), i:768 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:41:37]              1.50/3.75/4 GB
[2019-08-15 19:41:37] #05, GPU #02 Radeon (TM) RX 470 Graphics (Ellesmere), i:768 (8/256), si:1/2, u:8, cu:32
[2019-08-15 19:41:37]              1.50/3.75/4 GB
[2019-08-15 19:41:37] #06, GPU #03 Radeon (TM) RX 480 Graphics (Ellesmere), i:864 (8/256), si:1/2, u:8, cu:36
[2019-08-15 19:41:37]              1.69/3.75/4 GB
[2019-08-15 19:41:37] #07, GPU #03 Radeon (TM) RX 480 Graphics (Ellesmere), i:864 (8/256), si:1/2, u:8, cu:36
[2019-08-15 19:41:37]              1.69/3.75/4 GB
| THREAD | GPU | 10s H/s | 60s H/s | 15m H/s |
|      0 |   0 |   242.6 |     n/a |     n/a |
|      1 |   0 |   242.4 |     n/a |     n/a |
|      2 |   1 |   237.1 |     n/a |     n/a |
|      3 |   1 |   236.7 |     n/a |     n/a |
|      4 |   2 |   243.7 |     n/a |     n/a |
|      5 |   2 |   244.8 |     n/a |     n/a |
|      6 |   3 |   271.7 |     n/a |     n/a |
|      7 |   3 |   272.2 |     n/a |     n/a |
[2019-08-15 19:42:33] speed 10s/60s/15m 1991.3 n/a n/a H/s max 1992.7 H/s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants