使用为Maxwell GPU上的计算能力3.7编译的CUDA? [英] Using CUDA compiled for compute capability 3.7 on Maxwell GPUs?

查看:89
本文介绍了使用为Maxwell GPU上的计算能力3.7编译的CUDA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的开发工作站当前具有NVIDIA Quadro K2200和K620.两者都具有CUDA计算功能5.0.但是,最终的生产系统使用的是Tesla K80,后者的CUDA计算能力为3.7.

是否可以在我的Quadro GPU上安装和开发用于计算能力3.7的CUDA程序,然后将它们移至K80,而无需进行重大更改?

解决方案

是的,有可能.请确保不要在代码中使用任何计算功能 5.0或以上的特定功能,并且您应该能够在cc3.7设备或cc5.0设备上正确运行代码.

在编译代码时,试图使用内联PTX 中的 lop3.b32 指令,该指令在cc3.7设备上不起作用(使用上述编译开关,编译器会为您进行标记.)

My development workstation(s) currently have NVIDIA Quadro K2200 and K620. Both of which have CUDA compute capability 5.0. However, the final production system has a Tesla K80 which has CUDA compute capability 3.7.

Is it possible to install and develop CUDA programs for compute capability 3.7 on my Quadro GPUs and then move them to the K80 without having to make significant changes?

解决方案

Yes, it's possible. Be sure not to use any compute capability 5.0+ specific features in your code, and you should be able to run your code properly on either a cc3.7 device or a cc5.0 device.

When compiling your codes, specify target architectures for both compute capabilities, e.g.

-gencode arch=compute_50,code=sm_50 -gencode arch=compute_37,code=sm_37

and such a compilation method should be usable on either platform to create a usable binary. Furthermore, compiling that way will cause the compiler to flag any situations where you may have inadvertently used a cc5.0+ specific feature.

I think it's unlikely that you would inadvertently use a cc5.0+ specific feature; they wouldn't be part of common CUDA usage. As an example, if you attempted to use the lop3.b32 instruction in inline PTX, that would not work on a cc3.7 device (and using the above compile switches, the compiler would flag that for you.)

这篇关于使用为Maxwell GPU上的计算能力3.7编译的CUDA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆