Simple Question! Can CUDA code be run on CPU

Hello, I just want to know if the CUDA code can be made to run on x86 CPUs? ofcourse this will not run the code in parallel, but its just for testing purpose in the absence of an NVidia GPU. Does the toolkit support it

The current toolkits do not support it. However, gpuOcelot does.

And we do support parallel execution.

What is the news on the “CUDA for x86” that we heard about a few months ago? It’s an Nvidia project? Shouldn’t they have teamed up with the ocelot team for this kind of project?

Has there been any progress on using SSE instructions in the x86 backend of Ocelot? I’m curious to know how much benefit this gives…

This project is actually being done by PGI. I think that it is independent, but possibly encouraged by NVIDIA. There are a lot of details here:

The current status is that programs need to be divided into sections that are provably uniform on a warp-granularity and sections that may be divergent. Some applications are completely uniform, like nbody from the cuda sdk, but in the general case somewhere between 30% to 80% of the dynamic instructions in an application are provably uniform. For compute bound and uniform applications, the vecotrization path in Ocelot approaches peak performance, and is around 3x faster than the non-vectorized backend. We are still evaluating an approach for handling non-uniform applications.

I wonder why nobody mentioned this so far: OpenCL is designed to also run on the CPU. If you have a Mac with Mac OSX 10.6 you should be able to compile your OpenCL program for the GPU and the CPU. Intel also released a beta version of their Open CL toolkit which runs under Windows I think… I haven’t tried out OpenCL yet, bit if you want GPU and CPU support at the same time, you should probably have a look at OpenCL.

Yes, actually OpenCL is a nice solution because it supports both CPU type cores and also the GPU type cores. I only asked this question this question in first place cause CUDA is much simplified compared to OpenCL. But anyhow, now I have decided to go with OpenCL cause I see future belongs to this(or something similar). Also in the coming year we will have products with both CPU and GPU on a single chip and it will only grow in that direction with CPUs getting more cores. So need is for those products or programmers who can make the best use of these capabilities.