I am currently planning to develop an application using CUDA. But I may have to start the project on ordinary CPU for a period before I get GPU.
My question is: could I develop my program using CUDA on CPU first and then migrate to GPU when I get the hardware?
Is there any difference or any limitation if I program using CUDA only on CPU? And is it convinient to migrate to GPU later?
You could use the device emulation mode (just compile with -deviceemu option of NVCC) and get going.
But device emulation will NOT expose “race conditions”, “bad pointers” and a whole lot of bugs. And, you WONT get the right results because it does NOT model the base hardware correctly.
But still, its good to get things compiled and get ready for GPU.
As long as threads (espescially intra-warp) do NOT share data with each other – i.e. each thread works on a data-item separately – results would differ only by a matter of precision.