在VMware上的cuda程序 [英] cuda program on VMware
问题描述
我写了一个cuda程序,我在ubuntu上测试它作为一个虚拟机。这是因为我有Windows 7,我不想安装ubuntu作为辅助操作系统,我需要使用一个linux操作系统进行测试。
我的问题是:虚拟机会限制gpu资源吗?如果我在我的主要操作系统下运行它,而不是在虚拟机上运行,我的cuda代码会更快吗?
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?
推荐答案
虚拟机模拟图形设备,因此你不能访问真正的GPU。这是因为虚拟化处理多个VM访问同一设备的方式 - 它提供了一个层来共享实际设备。
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.
这是可能的真正的访问到硬件,但只有当您具有正确的软件和硬件组合,请参见 SLI Multi -OS site 了解详情。
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.
所以你可能没有运气的虚拟化路线 - 如果你真的不能运行你的应用程序在Windows,您仅限于以下内容:
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:
- 不切实际:安装Linux
- 不真实:安装Linux
- 启动到现场光盘,您可以使用CUDA准备磁盘映像并每次加载映像
- 设置
- Unrealistic: Install Linux instead
- Unrealistic: Install Linux alongside (not an option)
- Boot into a live CD, you could prepare a disk image with CUDA and mount the image each time
- Setup (or beg/borrow) a separate box with Linux and access it remotely
这篇关于在VMware上的cuda程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!