jamesstringerparsec / Easy-GPU-PV

A Project dedicated to making GPU Partitioning on Windows easier!
4.01k stars 407 forks source link

How can I get back my host VRAM after removing the partition? #286

Closed asthomas closed 1 year ago

asthomas commented 1 year ago

I have an 8GB AMD RX6600. I have successfully created a VM and run it with a GPU partition. Thanks for that. When I examine the GPU with "Get-WmiObject Win32_VideoController" in the host, it shows that the GPU has 4GB of available RAM (AdapterRAM line). That makes sense - 50/50 split.

Now I want to undo the partitioning. I have stopped the VM and run Remove-VMGpuPartitionAdapter to remove the partition from the VM. I then rebooted the host machine.

When I examine the GPU using "Get-WmiObject Win32_VideoController", I still see that the GPU has 4GB of available VRAM.

How do I get back the other 4GB in the host?

Kodikuu commented 1 year ago

That value is represented as a 32-bit integer, so it overflows if the value is higher than 4GB. You never lost your 4GB, that's not how GPU-PV works. Don't use that command to inspect VRAM.

When you give a VM a GPU-PV adapter, you're just letting that VM use up to the defined portion of the host GPU. Those resources aren't actually given to the VM. You don't even need to remove the adapter, or turn off the VM, for the host OS to use those resources, as they're never sectioned off. You could give a VM 100% of your GPU, and still use it without issue on the host OS, or even other VMs that are assigned adapters