I assume you're familiar with the WHP(Windows Hypervisor Platform), and you know how enable it, if not read this Install Hyper-V on Windows 10
Windows VM
Using GPU-PV, you can create a partition of your GPU and assign it to a Windows virtual machine
- Use this interactive tool to automate the process of installing and setting up a GPU-PV virtual machine
- Connect to the virtual machine
Make sure your GPU is visible.
Modern versions of Windows support GPU paravirtualization in Hyper-V with normal consumer graphics cards. This is used e.g. for graphics acceleration in Windows Sandbox, as well as WSLg. In some cases, it may be useful to create a normal VM with GPU acceleration using this feature, but this is not officially supported. People already figured out how to do it with Windows guests though, so why not do the same with Linux? It should be easy given that WSLg is open source and reasonably well documented, right?
Well... not quite. I managed to get it to run... but not well.
- Verify driver support
