Skip to contentSkip to conversation

kvm + pci-assign + cuda

DISCUSSION Bruno Cesar Ribas 1 participant 1 message Jul 27, 2010 KVM

lore
Share & tools
lore
#0 lore raw

Hi,

I just bought two machines AMD-Vi capable with a NVIDIA TESLA.

Has anyone tried to assign any NVIDIA to a virtual host and use CUDA on it?

I assigned the NVIDIA tesla and installed the nvidia driver, as follows:

root@tesla2:~# kvm -name sat -cpu host -smp 16 -daemonize -vnc :$1 \
        -localtime -m 60g  \
        -net nic,macaddr=00:16:3e:aa:aa:05,model=virtio,vlan=112\
        -net tap,vlan=112,ifname=sat112\
        -drive file=/raw/sat2.raw,if=virtio,boot=on\
        -device pci-assign,host=03:00.0

on my virtual host I get:

root@sat:~# lspci |grep -i nvidia
00:04.0 3D controller: nVidia Corporation GT200 [Tesla C1060] (rev a1)

and loaded the nvidia driver

root@sat:~# dmesg
...
[    4.004588] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  256.35  Wed Jun 16 18:42:44 PDT 2010
...

But when i run any app that uses CUDA a get the following on dmesg

[  136.157604] NVRM: RmInitAdapter failed! (0x23:0x2f:639)
[  136.157982] NVRM: rm_init_adapter(0) failed
[  136.161767] NVRM: RmInitAdapter failed! (0x23:0x2f:639)
[  136.162179] NVRM: rm_init_adapter(0) failed
[  136.165351] NVRM: RmInitAdapter failed! (0x23:0x2f:639)
[  136.165695] NVRM: rm_init_adapter(0) failed

Did anyone got this working? Or someone can guarantee that it is impossible to do that?

Thanks in advance,

Signature · 3 lines
Bruno Ribas - [email protected]
http://www.inf.ufpr.br/ribas
C3SL: http://www.c3sl.ufpr.br