cudadirect3dtesla

Tesla k20m interoperability with Direct3D 11


I would like to know if I can work with Nvidia Tesla K20 and Direct3D 11?

I'd like to render an image using Direct3D, Then process the rendered image with CUDA, [ I know how to work out the CUDA interoperability].

Tesla k20 doesn't have a display adapter (physically remote adapter )

I managed to do so with Tesla C2075, however with K20 I can't receive the device adapter ( EnumAdapters command ).

Is it possible to work with Tesla K20 and Direct3D ?

Frankly speaking, this code was written in notepad

Thanks

  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()
  }

Solution

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