为 CPU 编译 cuda 代码 [英] Compile cuda code for CPU

查看:35
本文介绍了为 CPU 编译 cuda 代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究 cuda 5.5,但我没有任何 Nvidia GPU.在旧版本的 nvcc 中有一个标志 --multicore 来为 CPU 编译 cuda 代码.在新版本的nvcc中,有什么选项??我在 Linux 上工作.

I'm study cuda 5.5 but i don't have any Nvidia GPU. In old version of nvcc have a flag --multicore to compile cuda code for CPU. In the new version of nvcc, what's is the option?? I'm working on Linux.

推荐答案

CUDA 工具包,因为至少 CUDA 4.0 不支持在没有 GPU 的情况下运行 cuda 代码的能力.

CUDA toolkits since at least CUDA 4.0 have not supported an ability to run cuda code without a GPU.

如果你只是想编译代码,参考这个问题.

If you simply want to compile code, refer to this question.

如果您想运行使用 CUDA 5.5 编译的 CUDA 代码,您将需要支持 CUDA 的 GPU.

If you want to run CUDA codes compiled with CUDA 5.5, you will need a CUDA capable GPU.

如果您愿意使用较旧的 CUDA 工具包,您可以安装各种模拟器之一,例如 这个.

If you're willing to use older CUDA toolkits, you could install one of the various emulators, such as this one.

或者您可以安装一个非常旧的(例如 ~ CUDA 3.0)cuda 工具包,它能够在 CPU 上运行 CUDA 代码.

Or you could install a very old (e.g. ~ CUDA 3.0) cuda toolkit that had the ability to run CUDA codes on the CPU.

这篇关于为 CPU 编译 cuda 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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