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

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

问题描述

我研究cuda 5.5,但我没有任何Nvidia GPU。在老版本的nvcc有一个标志--multicore来编译cuda代码为CPU。
在新版本的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 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.

或者您可以安装一个能够在CPU上运行CUDA代码的旧版本(例如〜CUDA 3.0)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天全站免登陆