Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
wslg
Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
Now if you look under /usr/lib/wsl/lib for libcuda*, you'll see 3 copies of the same file. That's almost good, but the expected shape is for libcuda.so to be a symlink on libcuda.so.1 and libcuda.so.1 to be a symlink on libcuda.so.1.1. Tweak that if you bump into issues. (#5663)
After which nvcc should be accessible to new sessions, and you can build C++ cuda stuff like cuda-samples. Python packages like pytorch should also see CUDA and be able to use it.
If you're new to WSL as I am, you'll marvel at graphical apps "just working", appearing as normal windows getting along like any other app. Under the hood, this isn't entirely unlike running a VM in "seamless mode". There are a few paths WSLG can take to make this happen, some better than other. If you have a linux GUI app running and open the windows "Task view" (by pressing Windows + Tab or whatever), if you see a "WARN: COPY MODE" label atop your linux apps, WSLG is being forced to use a slow path to render areas to screen. The exact reasons why escape me. An older ticket recommended installing an updated Mesa package to get to Mesa 21.x, but new WSL 2 installs are already there. Nonetheless, I followed those steps, ended up with Mesa 22.2.4, restarted WSL and the warning went away, replaced by a much higher refresh rate for linux windows (easy to check if you just drag a linux window around.) Notably, the warning came back once later, with scary logs in /mnt/wslg/weston.log about shared_memory errors, but restarting Windows made things better again.. YMMV.