Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile cuda code for CPU

Tags:

cuda

nvidia

nvcc

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.

like image 910
F.N.B Avatar asked Feb 21 '14 22:02

F.N.B


People also ask

Can I run CUDA code on CPU?

A single source tree of CUDA code can support applications that run exclusively on conventional x86 processors, exclusively on GPU hardware, or as hybrid applications that simultaneously use all the CPU and GPU devices in a system to achieve maximal performance.

Can I compile CUDA code without GPU?

The answer to your question is YES. The nvcc compiler driver is not related to the physical presence of a device, so you can compile CUDA codes even without a CUDA capable GPU.


1 Answers

Ideally, you'd be able to get access to a CUDA-compatible NVidia GPU.

But short of that, here's an emulator that might help:

  • https://code.google.com/p/cuda-waste/

If you have a Linux box, you can also try Ocelot:

  • http://gpuocelot.gatech.edu/faq/
like image 65
FoggyDay Avatar answered Sep 23 '22 07:09

FoggyDay