我只是将CUDA安装在这样的笔记本中:
sudo apt-get install cuda
就像这里说的。
编译工作正常,但是当我尝试运行时出现以下问题:file.cu:CUDA错误:128代码= 35(cudaErrorInsufficientDriver)“ cudaStreamCreate(&(stream [i]))”“
我的nvcc版本:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
显卡信息:
lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Skylake Integrated Graphics (rev 06)
02:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
我还安装了VirtualGL,bumblebee-nvidia,primus,freeglut3-dev。继此。
当我尝试在大黄蜂上运行某些东西时,我得到了:optirun glxspheres64
[ 41.413478] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver
[ 41.413520] [ERROR]Aborting because fallback start is disabled.
NVIDIA驱动程序不起作用。
nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
看起来已安装nvidia 375版本,但我无法使其正常运行。
whereis nvidia
nvidia: /usr/lib/nvidia /usr/share/nvidia /usr/src/nvidia-375-375.66/nvidia
和一些驱动程序信息。
modinfo nvidia_375
filename: /lib/modules/4.8.0-54-generic/updates/dkms/nvidia_375.ko
alias: char-major-195-*
version: 375.66
supported: external
license: NVIDIA
srcversion: 68751AFD79A210CEFFB8758
alias: pci:v000010DEd00000E00sv*sd*bc04sc80i00*
alias: pci:v000010DEd*sv*sd*bc03sc02i00*
alias: pci:v000010DEd*sv*sd*bc03sc00i00*
depends:
vermagic: 4.8.0-54-generic SMP mod_unload modversions
parm: NVreg_Mobile:int
parm: NVreg_ResmanDebugLevel:int
parm: NVreg_RmLogonRC:int
parm: NVreg_ModifyDeviceFiles:int
parm: NVreg_DeviceFileUID:int
parm: NVreg_DeviceFileGID:int
parm: NVreg_DeviceFileMode:int
parm: NVreg_UpdateMemoryTypes:int
parm: NVreg_InitializeSystemMemoryAllocations:int
parm: NVreg_UsePageAttributeTable:int
parm: NVreg_MapRegistersEarly:int
parm: NVreg_RegisterForACPIEvents:int
parm: NVreg_CheckPCIConfigSpace:int
parm: NVreg_EnablePCIeGen3:int
parm: NVreg_EnableMSI:int
parm: NVreg_TCEBypassMode:int
parm: NVreg_UseThreadedInterrupts:int
parm: NVreg_MemoryPoolSize:int
parm: NVreg_RegistryDwords:charp
parm: NVreg_RmMsg:charp
parm: NVreg_AssignGpus:charp
我认为这可能是一些驱动程序版本问题:
dpkg -l | grep nvidia
ii bumblebee-nvidia 3.2.1-10 amd64 NVIDIA Optimus support using the proprietary NVIDIA driver
ii nvidia-375 375.66-0ubuntu0.16.04.1 amd64 NVIDIA binary driver - version 375.66
ii nvidia-375-dev 375.66-0ubuntu0.16.04.1 amd64 NVIDIA binary Xorg driver development files
ii nvidia-modprobe 375.51-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
ii nvidia-opencl-icd-375 375.66-0ubuntu0.16.04.1 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.8.2 amd64 Tools to enable NVIDIA's Prime
我想念什么?
$ reboot now
。