cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

Neverhood
Adept II

Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

Good day!

Our company uses OpenCL framework to work with AMD GPUs. But unfortunately, the OpenCL driver for AMD 5700 XT GPU gives wrong calculation results. This applies for all GPU drivers I have tested so far, including the latest one: Adrenalin 2020 Edition 20.1.2 Optional for Windows 10 x64.

I have prepared a test tool to show the problem. You can found test executable, kernel code and code of the test itself in the attached archive. Just launch "test-ripemd.exe".

The test calculates the Ripemd160 hash of string "111...1" (85 chars of "1") and expects the result

CC 65 31 86 F8 7E 53 DA 26 A9 97 BE 04 AC 47 CC 24 6A 70 63.

On a machine with AMD RX 580/560 series GPU the test gives us the expected Ripemd160 hash. But on a machine with AMD 5700 XT GPU the test gives us a wrong Ripemd160 hash:

C0 0C CB BE E8 77 02 A0 70 D1 57 C3 1D 41 E3 1C 42 C9 DD 07

There is no warnings, no compilation errors.

How can I connect with AMD developers to fix this issue?

Best regards, Dmitry.

1 Solution

Accepted Solutions
dipak
Staff
Staff

Re: Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

Update:

The above compiler optimization issue has been fixed and the fix is expected to be released soon.

Thanks.  

View solution in original post

0 Likes
Reply
10 Replies
goodplay
MVP

Re: Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

You could try your luck https://www.amd.com/en/corporate/contact/locations

Got any links to an official/recognised/well known website (say GitHub) where someone could read about your app. amdmatt instead of just dropping an attachment.

Ryzen 5 5600x, B550 aorus pro ac, Hyper 212 black, 2 x 16gb F4-3600c16dgtzn kit, Aorus gen4 7000s 2tb, Nitro+RX6900XT, RM850, Win.10 Pro..
0 Likes
Reply
dipak
Staff
Staff

Re: Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

Thank you for reporting the above issue and providing the reproducible test-case. I have moved this post to our OpenCL developer forum. 

Also I have reported the issue to the OpenCL team and opened a bug ticket against it. Once I've any update on this, I will get back to you.

Thanks.

0 Likes
Reply
dipak
Staff
Staff

Re: Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

Update:

The kernel seems producing expected result when compiler optimization is disabled (i.e. kernel build flag is "-O0"). So this might be a compiler optimization issue here. The concerned team is investigating it in detail.

As a workaround, you can use kernel build flag "-O0" until a fix is available.

Thanks.

Neverhood
Adept II

Re: Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

Thank you, dipak‌, for your reply! I will looking forward to the update of optimization compiler, because the disabled optimization is definitely not the thing we can afford to do in our product.

dipak
Staff
Staff

Re: Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

Update:

The above compiler optimization issue has been fixed and the fix is expected to be released soon.

Thanks.  

View solution in original post

0 Likes
Reply
Neverhood
Adept II

Re: Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

Great news! Thanks a lot!

0 Likes
Reply
dipak
Staff
Staff

Re: Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

Could you please try the latest driver and let me know if the above issue has been resolved?

Thanks.

0 Likes
Reply
develancer
Adept I

Re: Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

I have tested the attached source code and "Calculation result is right" under Ubuntu 20.04.1 + ROCm 4.0.1 on RX 5700 XT.

This is apparently a different problem that the one reported in https://community.amd.com/t5/opencl/wrong-int64-multiplication-on-rx-5700-xt/m-p/446493

0 Likes
Reply
Neverhood
Adept II

Re: Wrong OpenCL calculation result on AMD 5700 XT

Jump to solution

@dipak, sorry for delay. Yes, the issue has been resolved in the latest driver.

But we have another issue with other kernel, so we will try to replicate the bug and will open a new request.

0 Likes
Reply