cuda8.0使用nvcc编译程序出现warning:The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated的解决办法
2016-12-30 15:46
615 查看
初学CUDA,使用的NVIDIA显卡是Tesla K80, 安装的是cuda8.0
写了一个简单的测试程序,使用nvcc编译,指令如下: nvcc cudaPrintDeviceInfo.cu -o cudaPrintDeviceInfo
本以为会很顺利地生成执行文件。但还是出现了warning:
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
查阅了一些资料,发现这只是提示build target 2.0, 2.1被弃用了。
如果不想让这些提示出现,只需要在编译时加上一个参数,表示基于自己显卡的计算能力选择build target即可。
Tesla K80支持CUDA compute ability 3.7, 因此在编译时使用如下命令:
nvcc -arch=sm_35 cudaPrintDeviceInfo.cu -o cudaPrintDeviceInfo
即可解决问题。
可参考: http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#warp-examples-broadcast
其中Application Compatibility部分有如下解释:
YES!
写了一个简单的测试程序,使用nvcc编译,指令如下: nvcc cudaPrintDeviceInfo.cu -o cudaPrintDeviceInfo
本以为会很顺利地生成执行文件。但还是出现了warning:
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
查阅了一些资料,发现这只是提示build target 2.0, 2.1被弃用了。
如果不想让这些提示出现,只需要在编译时加上一个参数,表示基于自己显卡的计算能力选择build target即可。
Tesla K80支持CUDA compute ability 3.7, 因此在编译时使用如下命令:
nvcc -arch=sm_35 cudaPrintDeviceInfo.cu -o cudaPrintDeviceInfo
即可解决问题。
可参考: http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#warp-examples-broadcast
其中Application Compatibility部分有如下解释:
YES!
相关文章推荐
- Caffe编译的时候出现warning: The 'compute_20' and 'sm_20' architectures are deprecated怎么办
- 解决类似nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated....等问题
- 解决nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated问题
- nvcc warning : The ‘compute_20’, ‘sm_20’, and ‘sm_21’ architectures are deprecated, and may be remov
- 为什么出现:warning: The 'compute_10' and 'sm_10' architectures are deprecated
- -[UIKeyboardTaskQueue waitUntilAllTasksAreFinished] may only be called from the main thread.【创建键盘监听事件,然后操作键盘(弹出、收回),结果在运行程序时出现如下错误(如有知道解决办法的朋友请留言探讨!)】
- Ubuntu16:cmake生成Makefile编译caffe过程(OpenBLAS/CPU+GPU)塈解决nvcc warning:The 'compute_20', 'sm_20'
- Laravel 出现"RuntimeException inEncrypter.php line 43: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths."问题的解决办法
- 使用ec编译cocos项目是出现Android.mk文件报错Are you sure your NDK_MODULE_PATH variable is properly defined 的解决办法
- Mac OS X下编译CUDA6例子时出现关于switch的warning的解决办法
- cfree使用cygwin编译程序出现计算机丢失cygwin1.dll解决办法
- Ubuntu16:cmake生成Makefile编译caffe过程(OpenBLAS/CPU+GPU)塈解决nvcc warning:The 'compute_20', 'sm_20'
- 解决使用qt creator编译程序时出现cannot find -lGL的问题
- 使用64位系统用vs2008开发软件,程序编译后无法连接ODBC的解决办法
- CUDA的MFC程序框架中编译出现nafxcw.lib与LIBCMT.lib链接重定义的解决
- 使用Mingw在Windows下编译出现的问题以及解决办法
- warning: the 'gets' function is dangerous and should not be used.的解决办法
- 用ssh上传文件到Ubuntu上出现“Encountered 20 errors during the transfer“的解决办法!
- win7下用cygwin编译程序出现couldn't allocate heap,win32 error xxx错误的解决办法
- 在VC6下编译MTL程序,出现的C4786错误的原因和解决办法