DTolm / VkResample

Vulkan real-time FFT upscaling
Mozilla Public License 2.0
41 stars 0 forks source link

Double Precision Leads To Bad Radeon Driver Issues (RADV) #1

Open michaellarabel opened 3 years ago

michaellarabel commented 3 years ago

Hi,

I just started running some benchmarks with VkResample ( https://openbenchmarking.org/test/pts/vkresample ). One thing I have noticed is that if using the double precision mode on various Radeon GPUs it will usually lead to hangs or very bad screen corruption... Not sure if this is an issue with VkResample or of the Mesa RADV drivers on Linux, but just reporting. Have seen this behavior with many different Radeon cards on Ubuntu 20.04/20.10. The default single precision is working fine but if using the double precision mode is when frequently seeing the screen corruption or other major issues come up.

Michael

DTolm commented 3 years ago

Hello, thanks for trying VkResample out! As of now, it uses the GPU resources fully, so if multiple launches of the upsampler are merged consecutively (to hide the dispatch call overhead), it can very well starve the system out of the GPU resources. Especially in double precision, which is much harder than single for modern consumer-level GPUs. Doing a smaller number of upscales in a single command buffer dispatch should remove the freezes. Luckily, double precision is not really needed for image processing. Also, 4k to 8k upscaling is a special case as near those sizes lies the limit of the FFT sequence size that can be done in one upload to the chip. There are some enchancements that I have not yet rewritten from the previous VkFFT version to the runtime shader generation version, so its speed will be increased up to 4x in the future.

Best regards, Dmitrii

TheJackiMonster commented 3 years ago

I have also tested the tool and got a weird result. I have run it on Archlinux with Mesa RADV drivers and tried half, single and double precision with a RX 5700. Half and single precision work fine but double precision results in long calculation time and a fully black image (the tool doesn't give any warning or error though).

I have also checked via radeontop if there is a VRAM limitation but it seems that the test with double precision required less than 4GB. So about half of the memory is utilized. So I would think there is still an issue but I'm not sure if it's application or driver related.