如何在未安装 CUDA 工具包的机器上 运行 编译后的 CUDA 代码?

How to run a compiled CUDA code on a machine that doesn't have the CUDA toolkit installed?

与 geforce (cc5.0) 的大量 cuda 内核相比,任何内存受限的应用程序是否会受益于 tesla(cc2.0) 的高内存吞吐量?

我如何 运行 在带有 geforce 卡的机器上编译的 exe 文件在另一台带有 tesla 卡的机器上而不在 tesla 机器上安装 VS2010 和 cuda(即我希望这个 exe 文件是独立的应用程序)?

will any memory bound application benefit from high memory throughput of tesla(cc2.0) more than high number of cuda cores of geforce (cc5.0)?

内存受限的 CUDA 应用程序可能 运行 在具有更高内存带宽的 GPU 上最快。当然还有其他因素会影响这一点,但这是一个合理的一般原则。我不确定您指的是哪两张卡,但是特定的 GeForce GPU 完全有可能比特定的 Tesla GPU 具有更高的内存带宽。 cc2.0 Tesla GPU(例如 M2050、C/M2070、C/M2075、M2090)可能确实比我知道的 cc5.0 GeForce GPU(例如 GeForce)具有更高的内存带宽(超过 100GB/s) GTX 750/750Ti -- 低于 90GB/s)。

how can i run exe filed compiled on machine with geforce card on another machine with tesla card without installing VS2010 and cuda on tesla machine (ie i want this exe file to be stand alone application)?

有几件事很容易做到,可以更轻松地将已编译的 CUDA 代码从一台机器移动到另一台机器。

  1. 确保 CUDART 库是静态链接的。这应该是最近 CUDA 版本的 default 设置。您可以阅读更多相关信息 here。如果您正在使用其他库(例如 CUBLAS 等),您需要确保这些其他库也静态链接(如果可能)或捆绑库(.so 文件在 linux,.dll 在 windows) 与您的申请。

  2. 针对一系列计算架构进行编译。例如,如果您知道您只需要并希望以 cc2.0 和 cc5.0 为目标,那么请确保您的 nvcc 编译命令行包含同时以 cc2.0 和 cc5.0 为目标的开关。这是一个相当复杂的主题,但如果您查看 CUDA sample codes (makefiles or VS projects) you will find examples of projects that build for a wide variety of architectures. For maximum compatibility, you probably want to make sure you are including both PTX and SASS in your executables. You can read more about it here and here.

  3. 确保机器有兼容的驱动程序。例如,如果您使用 CUDA 7.0 工具包编译 CUDA 代码,您将只能在安装了兼容 GPU 驱动程序的机器上 运行 它(该驱动程序是工具包中的一个单独项目。GPU 驱动程序是使用 GPU 所必需的,而 CUDA 工具包不是。)对于 CUDA 7,这大致意味着您需要在要 运行 CUDA 7 编译代码的任何机器上安装 r346 或更新的驱动程序。其他 CUDA 工具包版本具有其他关联的最低驱动程序版本。作为参考,此 给出了某些最新 CUDA 工具包版本所需的近似最低 GPU 驱动程序版本的概念。