i wrote a cuda program and i am testing it on ubuntu as a virtual machine. the reason for this is i have windows 7, i don't want to install ubuntu as a secondary operating system, and i need to use a linux operating system for testing. my question is: will the virtual machine limit the gpu resources? So will my cuda code be faster if i run it under my primary operating system than running it on a virtual machine?
Answer to my own question: GPU virtualization is supported by VMWare. Need to install hypervisor on host machine that has graphics card. vDGA is achieved by setting device passthrough on the graphics card and assigning the card to individual virtual machine. Then CUDA code can run on the virtual machine.
Installing Cuda Toolkit and cudaDNN The advantage of using anaconda is you can have multiple versions of the Cuda toolkit in your System in different virtual environments. To install Cuda Toolkit, Open Anaconda Prompt, activate the virtual environment. It will install all the dependent packages.
This release of NVIDIA vGPU software provides support for the following NVIDIA GPUs on VMware vSphere, running on validated server hardware platforms: GPUs based on the NVIDIA Maxwell™ graphic architecture: Tesla M6 (NVIDIA Virtual Compute Server (vCS) is not supported.) Tesla M10 (vCS is not supported.)
I faced a similar task once. What I ended up doing was installing Ubuntu on a 8GB thumb drive with persistent mode enabled.
That gave me 4GB to install CUDA and everything else I needed.
Having a bootable USB stick around can be very useful. I recommend reading this.
Also, this link has some very interesting material if you're looking for other distros.
Unfortunately the virtual machine simulates a graphics device and as such you won't have access to the real GPU. This is because of the way the virtualisation handles multiple VMs accessing the same device - it provides a layer in between to share the real device.
It is possible to get true access to the hardware, but only if you have the right combination of software and hardware, see the SLI Multi-OS site for details.
So you're probably out of luck with the virtualisation route - if you really can't run your app in Windows then you're limited to the following:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With