CUDA 11.2 cudaGetDeviceCount bug

I just installed the CUDA Toolkit 11.2 on my Windows 10 system.
After recompiling some code I noticed that cudaGetDeviceCount always returns error code 1 (invalid argument). Older binaries are working just fine.

Is my installation broken, or can somebody reproduce it?
Here’s some sample code:

dude, u should use 11.2 with latest NV driver but not the one for CUDA for WSL.