Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cuda program on VMware

Tags:

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?

like image 948
scatman Avatar asked Feb 14 '10 11:02

scatman


People also ask

Can I use CUDA in VMware?

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.

Can we install CUDA in virtual environment?

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.

Can I use NVIDIA GPU on VMware?

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.)


2 Answers

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.

like image 58
karlphillip Avatar answered Oct 30 '22 14:10

karlphillip


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:

  1. Unrealistic: Install Linux instead
  2. Unrealistic: Install Linux alongside (not an option)
  3. Boot into a live CD, you could prepare a disk image with CUDA and mount the image each time
  4. Setup (or beg/borrow) a separate box with Linux and access it remotely
like image 31
Tom Avatar answered Oct 30 '22 14:10

Tom