Virtual Machine

Para-virtualization

WSL2 is type of para-virtualization. In this framework, the guest OS is aware of it being a guest and can talk to the hypervisor. WSL2 does not support hardware pass-thru like Hyper-V. The Nvidia + Cuda drivers on WSL2 are just lightweight wrappers/linkers that send off GPU instructions to the windows graphics driver through symlinking: /lib/wsl/lib/libcuda or libnvidia to C:WindowsSystem32lxssliblibcuda or libnvidia [1] . As a result, it doesn’t need vgpu to work. Maybe we can replicate something like this on Linux.

References

[1] https://github.com/microsoft/WSL/issues/10294#issuecomment-1646219057