Bug 106980 - Basemark GPU vulkan benchmark hangs on GFX9
Summary: Basemark GPU vulkan benchmark hangs on GFX9
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/radeon (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-20 22:45 UTC by Bas Nieuwenhuizen
Modified: 2018-10-31 15:21 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Miscompiled shader (45.44 KB, application/octet-stream)
2018-06-20 23:23 UTC, Bas Nieuwenhuizen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bas Nieuwenhuizen 2018-06-20 22:45:28 UTC
basemark: https://www.basemark.com/products/basemark-gpu/

to run you need some old libraries:
https://packages.ubuntu.com/bionic/amd64/libcurl3/download
https://packages.ubuntu.com/bionic/amd64/libssl1.0.0/download

just download, extract and use LD_LIBRARY_PATH

it aborts with

extra entries in SSA def uses:
0x7ff0281861a0


Christoph Haag tested without nir_validate and for him it hung.
Comment 1 Bas Nieuwenhuizen 2018-06-20 23:05:54 UTC
with some print debugging, it looks like the failing validate is here:

https://gitlab.freedesktop.org/mesa/mesa/blob/master/src/amd/vulkan/radv_shader.c#L233

which is directly after spirv_to_nir. I think it is a reasonable assumption that this is a spirv_to_nir bug.
Comment 2 Bas Nieuwenhuizen 2018-06-20 23:23:21 UTC
Created attachment 140254 [details]
Miscompiled shader

Attached is the failing shader. spirv2nir is enough to trigger if you add a nir_validate_shader call at the end.
Comment 3 Bas Nieuwenhuizen 2018-06-23 10:50:28 UTC
Seems like the validation issue was fixed by the deref rewrite, and that has been upstreamed now.

However, now I get the hang too ...

Moving back to the radv-component since there is no hint at the moment that it is an issue on anv too.
Comment 4 Jason Ekstrand 2018-06-23 16:26:05 UTC
(In reply to Bas Nieuwenhuizen from comment #3)
> Seems like the validation issue was fixed by the deref rewrite, and that has
> been upstreamed now.

That makes me suspicious.  If we were getting a validation error before, likely something is still going wrong.
Comment 5 Jason Ekstrand 2018-06-25 16:15:42 UTC
I just sent two patches for stable which fix the validation issues.  Turns out there's nothing wrong with spirv_to_nir, just the validator having issues.  Sadly, that means the hang is likely real. :-(
Comment 6 Samuel Pitoiset 2018-08-22 12:41:46 UTC
The following patch fixes a crash on GFX8:
https://patchwork.freedesktop.org/series/48560/
Comment 7 Samuel Pitoiset 2018-08-22 13:36:18 UTC
The crash on GFX8 should be fixed with https://cgit.freedesktop.org/mesa/mesa/commit/?id=4c43ec461de4f122d5d6566361d064c816e4ef69

Next step is to test with GFX9.
Comment 8 Samuel Pitoiset 2018-10-31 15:21:56 UTC
I can't reproduce a GPU hang on GFX9 with latest mesa/llvm. Closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.