CUDA 7 trouble running deviceQuery and all other samples

Hi,
I just installed CUDA 7 on a Xen server.
My GPU is GTX 750 ti.
GPU driver and CUDA are installed properly i believe.
When I try to run deviceQuery from sample, it gives me:

./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 38
-> no CUDA-capable device is detected
Result = FAIL

I am lost at this step as I have been writing CUDA program for a year now but I have never done it in Xen Server. Any pointer would be appreciated. The essential driver outputs (lspci, mvcc -V, nvidia-smi) are shown below, and I believe they all behave properly.

<i>lspci |grep -i nvidia</i> returns:
01:00.0 VGA compatible controller: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] (rev a2)
01:00.1 Audio device: NVIDIA Corporation Device 0fbc (rev a1)
<i>nvidia-smi</i> returns:
+------------------------------------------------------+
| NVIDIA-SMI 346.46     Driver Version: 346.46         |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 750 Ti  Off  | 0000:01:00.0     N/A |                  N/A |
|ERR!   29C    P8    N/A /  N/A |      7MiB /  2047MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0            C+G   Not Supported                                         |
+-----------------------------------------------------------------------------+
<i>nvcc -V</i> returns:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Mon_Feb_16_22:59:02_CST_2015
Cuda compilation tools, release 7.0, V7.0.27

Some update, I have updated my driver to 346.47. Still the same problem. any pointer will be appreciated.

I’m not sure GTX 750 Ti is supported in PCI Passthrough configurations by the NVIDIA driver.

thanks for the reply. Do you mean PCI passthrough for Xen? In theory, Nvidia doesn’t support PCI passthrough in Xen. I am solely doing it in Dom0, the Xen host domain. That’s why lspci and driver can be installed.

The dom0 in Xen is paravirtualized, right?

[url]Xen Kernel Feature Matrix - Xen

The NVIDIA driver is not intended to be used in a paravirtualized setting. (pvops dom0)

not sure what this means:

“In theory, Nvidia doesn’t support PCI passthrough in Xen”

It is indeed PV (para-virtualization).

Basically what I am saying is that Nvidia card cannot do PCI passthrough, I have no idea if that’s true.

If the driver is not intended to be used in PV, may I ask what’s the best setting for using GPU in Xen?

Use it in a PCI pass through situation with an HVM domU. (But note what I said previously… I’m not sure all NVIDIA GPUs are supported by the driver in a PCI pass through scenario.)

Hm… I think I might have misled you in my post. With your help, I now know that HVM work but PV doesn’t, great!
But the moral of the problem is that I want to use my GPU/CUDA in Dom0 instead of DomU, so VGA passThrough shouldn’t be a problem to begin with. The problem is probably that there are problems in the driver trouble with Xen, given my X server doesn’t work in Dom0 with GPU.

I have opened another post to properly address the real “elephant”, see here: GTX 750 Ti Blank Screen On Xen 4 - CUDA Setup and Installation - NVIDIA Developer Forums

Very appreciated for your pointers tho.