2

第一个问题是
cudaGetDeviceCount 返回cudaErrorNoDevice
这表明安装的 CUDA 驱动程序没有检测到支持 CUDA 的设备。

cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86 Kernel Module  260.19.26  Sun Nov 28 22:38:24 PST 2010
GCC version:  gcc version 4.4.5 (Gentoo 4.4.5 p1.2, pie-0.4.5) 

lspci -v

...
02:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce GTS 250] (rev a2) (prog-if 00 [VGA controller])
    Flags: bus master, fast devsel, latency 0, IRQ 19
    Memory at fb000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at f8000000 (64-bit, non-prefetchable) [size=32M]
    I/O ports at ec00 [size=128]
    [virtual] Expansion ROM at fafe0000 [disabled] [size=128K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Endpoint, MSI 00
    Capabilities: [100] Virtual Channel <?>
    Capabilities: [128] Power Budgeting <?>
    Capabilities: [600] Vendor Specific Information <?>
    Kernel driver in use: nvidia
    Kernel modules: nvidia
 ...

nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2010 NVIDIA Corporation
Built on Wed_Nov__3_16:14:08_PDT_2010
Cuda compilation tools, release 3.2, V0.2.1221

CUDA 计算 SDK 3.2.16

当我尝试制作 sdk 样本时,我遇到了第二个问题

make[1]: Entering directory `/home/style/NVIDIA_GPU_Computing_SDK/C/src/MersenneTwister'
nvcc fatal   : Unsupported gpu architecture 'compute_20'

我试图编辑 common.mk,但我不知道我应该编辑什么

感谢帮助

4

3 回答 3

1

验证您是否有 /dev/nvidia0。如果不这样做,您可能需要重新启动 X。

于 2011-04-03T17:21:02.760 回答
0

I don't see the error where it says you have no CUDA devices.

In answer to your second question:

GeForce GTS 250 supports CUDA 1.1 not 2.0. You need to edit the compilation flags to replace compute_20 with compute_11.

于 2011-04-03T15:43:20.760 回答
0

由于我遇到了同样的问题,唯一对我有用的解决方案是重新安装驱动程序。请注意,驱动程序不包含在 SDK 中。

于 2013-04-10T13:34:06.990 回答