Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you Program/Test CUDA in a Virtual Machine?

I ask this as a programming and environment question. Can you test/program CUDA within a virtual machine accessing the physical GPU card?

I am buying a new (really nice system) to, in part, experiment with basic CUDA programming. The processor will be an Intel i7-4770 which supports VT-d (direct IO pass-through) OR a i7-4770K which does not. Will the VT-d support allow access to the GPU card from the VMs? (I have looked at Intel, motherboard mfg. sites, and docs on VMs but did not see an answer to this question.)

I plan to run Linux as my base operating system on the new development box with virtual machines (probably via QEMU/KVM) to test the software in other environments such as Windows and Mac OS. I other words, I would do the major development on the Linux box and then need to test on a virtual machine running on the same box.

But, will the VM OSs be able to access the GPU card for testing/development?

[First asked July 2013]

like image 548
SaB Avatar asked Nov 12 '22 00:11

SaB


1 Answers

It depends on what NVIDIA card you're using. See for example: (this is in regards to Xen) http://wiki.xen.org/wiki/XenVGAPassthroughTestedAdapters#Nvidia_display_adapters

The short answer is you probably would need to rely on modifying a consumer card as they link above as 'Australian crazy guy'.

like image 151
L T Avatar answered Dec 06 '22 04:12

L T