Your device driver installation is probably broken. Not so sure...
I know there are older threads about this, but no solution on the horizion. On my Win 10/1903+RX580 I get
Your device driver installation is probably broken.
See also:
Aborting session due to kernel self-test failure.

The box is a clean installation just to run hashcat. I installed the latest drivers from AMD and using both the latest stable 5.1.0 and the latest build from source (1184-g2e32eaf2) I get the above message.
Let's assume the drivers are broken, so I installed The Crimson version as requested by the docs. Same message.
I tried to build several 5.1 from the source and any of them spits the same error.
In each of the two configurations the hashcat 5.0.0 binary runs with no problems.
On the same machine I run John with both the sets of drivers (Adrenalin and Crimson) and have no problem.
I get the same results also on my Win10/1809 with R5 M335 with older 19.5.2 drivers.
Given this I'm not so sure the problem is in the drivers but, if it is, which Windows 10 x64 version of drivers works with the current hashcat 5.1.x?