CUDA and Virtualbox

Currently I do C++ development using MSVC 2008 on a Windows 7 64-bit Virtual Machine running under Oracle Sun Virtualbox. The host machine also happens to be running Windows 7 64-bit.

Is there any way to run CUDA code from the virtual machine? If that is not possible then can I at least compile the code on the Virtual Machine and then run it on the host, or does the nvcc compiler need access to the GPU card for information? Also, can the CUDA code be ran in emulation mode on the Guest VM? It would be nice if I could compile, debug in emulation mode, on the VM and then later run the non emulation version on the host.

I am quite sure that CUDA cannot be use in a VirtualBox (on my linux VirtualBox on Windows it’s not).

You can compile code gpu code for another computer you just have to know the compute capability of your CUDA device and specify it with nvcc -arch sm_xx where xx is your GPU capability (10 for 1.0, 11 for 1.1 …)

Emulation mode is still available but deprecated.

nvcc --device-emulation

NOTE: device emulation mode is deprecated in this release

	  and will be removed in a future release.

Nexus tools allows you to debug your GPU code but not in a VM.

I am quite sure that CUDA cannot be use in a VirtualBox (on my linux VirtualBox on Windows it’s not).

You can compile code gpu code for another computer you just have to know the compute capability of your CUDA device and specify it with nvcc -arch sm_xx where xx is your GPU capability (10 for 1.0, 11 for 1.1 …)

Emulation mode is still available but deprecated.

nvcc --device-emulation

NOTE: device emulation mode is deprecated in this release

	  and will be removed in a future release.

Nexus tools allows you to debug your GPU code but not in a VM.

Copy the host CUDA instalation directory in the Virtual Machine

For example: C:\CUDA

Manually set the following system variables of virtual machine

CUDA_BIN_PATH C:\CUDA\bin64

CUDA_INC_PATH C:\CUDA\include

CUDA_LIB_PATH C:\CUDA\lib64

Add to the Path system variable C:\CUDA\bin64

I use VirtualBox with a host with Windows7 64 bits.

I have VS2008 on a virtual machine with Windows7 32 bits.

I can compile CUDA without problems.

A greeting

Copy the host CUDA instalation directory in the Virtual Machine

For example: C:\CUDA

Manually set the following system variables of virtual machine

CUDA_BIN_PATH C:\CUDA\bin64

CUDA_INC_PATH C:\CUDA\include

CUDA_LIB_PATH C:\CUDA\lib64

Add to the Path system variable C:\CUDA\bin64

I use VirtualBox with a host with Windows7 64 bits.

I have VS2008 on a virtual machine with Windows7 32 bits.

I can compile CUDA without problems.

A greeting