安装cuda 9.0出现没有核心执行或找不到核心的问题但是cuda8.0可以正常运行

windows7 cuda9.0   GT 630M vs2015

出现同样的代码,使用cuda8.0可以检测到GPU

而 使用cuda9.0不可以。(cudaGetDeviceCount=0) 本来以为是版本冲突,直到看到下面这篇文章!!

https://blog.csdn.net/zhouyiqi_c/article/details/79121469

原来是计算能力的问题,我的GPU计算能力达不到cuda9.0的要求(计算能力3.0)。

测试代码如下:

int main()
{
    const int arraySize = 5;
    const int a[arraySize] = { 1, 2, 3, 4, 5 };
    const int b[arraySize] = { 10, 20, 30, 40, 50 };
    int c[arraySize] = { 0 };

	cudaDeviceProp prop;
	//cudaSetDevice(1);
	int count;
	//读取设备的数量
	cudaGetDeviceCount(&count);
	printf("GPU_count = %d\n\n", count);
	for (int i = 0; i

 

你可能感兴趣的:(各种各样出错的处理)