我想知道我是否可以使用Nvidia Tesla K20和Direct3D 11?
我想使用Direct3D渲染图像,然后使用CUDA处理渲染图像,[我知道如何计算CUDA互操作性]。
Tesla k20没有显示适配器(物理远程适配器)
我设法使用Tesla C2075,但是使用K20我无法接收设备适配器(EnumAdapters命令)。
是否可以使用Tesla K20和Direct3D?
坦率地说,这段代码是用记事本写的
谢谢
IDXGIFactory* factory = 0 ;
IDXGIAdapter* adapter = 0 ;
int dev = 0;
CreateDXGIFactory( __uuidof(IDXGIFactory) , (void**)&factory);
for (unsigned int i = 0 ; !adapter ; ++i )
{
if ( FAILED( factory->EnumAdapters (i , &adapter )))
break;
if ( cudaD3D11GetDevice(&dev , adapter) == cudaSuccess )
break;
adapter->Release()
}
答案 0 :(得分:6)
No, this won't be possible.
K20m can be used (with some effort) with OpenGL graphics on Linux, but at least up through windows 8.x, you won't be able to use K20m as a D3D device in Windows.
The K20m does not publish a VGA classcode in PCI configuration space, which means that niether windows nor the NVIDIA driver will build a proper windows display driver stack on this device. Without that, you cannot use it as a D3D device. Additional evidence of this is visible through the nvidia-smi
utility, which will show the K20 device as being in TCC mode. Any attempts to switch it to WDDM mode will fail (in some fashion - the failure may not be evident until a reboot).
If you find another GPU (such as Tesla C2075) for which it's possible, it invariably means, among other things, that the GPU is publishing a VGA classcode in PCI config space.
This general document covers classcode location in the PCI header on slide 62. This ECN excerpts the classcode definition. A VGA classcode is 0x0300, whereas a 3D controller classcode (I believe that is what K20m publishes) is 0x0302.
There are a few limited exceptions to the above. For example, a Tesla M2070Q in one configuration does not publish a VGA classcode (there is another configuration where it does publish a VGA classcode), but instead publishes a 3D controller classcode. In this configuration, it is usable by Microsoft RemoteFX as a shared graphics device for multiple Hyper-V VMs. In this situation, some D3D capability (up through DX9) is possible in the VMs.
In linux, the difference between a "3D Controller" and "VGA Controller" is evident using the lspci command.
In windows, you can get a config space reader to look at the difference, or you can look in Device Manager. The Tesla C2075 should show up under "Display Adapters" whereas the K20m will show up somewhere else.