15

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.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
F.N.B
  • 1,539
  • 6
  • 23
  • 39
  • Thank you for clarifying "Linux". You really need a GPU. But the next best thing is Ocelot: try it. I'm unfamiliar with "--multicore", and I didn't see it anywhere on the NVCC page, so I can't help you there. But I think your best bet is 1) a real GPU, or 2) an emulator like CUDA-Waste or Ocelot. IMHO... – FoggyDay Feb 21 '14 at 22:57

3 Answers3

6

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.

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

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

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.

Community
  • 1
  • 1
Robert Crovella
  • 143,785
  • 11
  • 213
  • 257
2

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:

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

FoggyDay
  • 11,962
  • 4
  • 34
  • 48
  • 1
    The problem in my case is the ram amount. Getting 24Tb on a cpu is possible while the best gpu is locked at 16Gb. – user2284570 May 24 '20 at 12:13
0

In current versions of CUDA, programs are debugged directly while they are running on the GPU. This is far superior to older versions of CUDA, which used an emulator for debugging. The debugging facilities are also much more powerful in current versions of CUDA.

So, if wish to write any CUDA code, a CUDA capable GPU card will give you immediate return on investment when you need to debug.

You can pick up an older used card for very little. Examine the features of each of the compute capabilities to determine how far back you are willing to go.

There are also some sites online that will let you test out CUDA code. NVIDIA has the CUDA test drive program. The Intro to Parallel Programming course at Udacity includes an online CUDA compiler for the coding assignments.

Community
  • 1
  • 1
Roger Dahl
  • 15,132
  • 8
  • 62
  • 82
  • 2
    It is not just about return on investment! Any serious application should have tests and you want to be able to run tests on any machine, even if it is slower. – dashesy Mar 12 '17 at 06:02
  • @dashesy if you can't test the real performance on GPU because you don't have one, you miss the main objective of CUDA which is to improve it. –  Jan 29 '21 at 15:17
  • test is not just for performance (benchmark test), we also need to test for application correctness to avoid regression. Unit testing, A/B testing, ... – dashesy Jan 29 '21 at 23:53