Can't run CUDA sample in WSL2

I have a ASUS laptop with Ryzen 4900HS and RTX 2060 MAXQ. Winver is 20231 and installed 456.71 driver. I’ve checked


These all existing.
After I installed for samples and make BlackScholes, output raise error

[./BlackScholes] - Starting…
CUDA error at …/…/common/inc/helper_cuda.h:779 code=35(cudaErrorInsufficientDriver) “cudaGetDeviceCount(&device_count)”

./BlackScholes_nvrtc: error while loading shared libraries: cannot open shared object file: No such file or directory

Do I need to install other driver in WSL? When I ran there was no option for driver though.

Try installing latest preview driver 460.20.

If it doesn’t work yet it’s because of this WSL2 bug since Insider build 20226
Fixed build should come in 2-3 weeks.