problem: ch. 7 heat transfer example in cuda by example The heat transfer example runs very slowly

The heat transfer example in Ch. 7 from Cuda by Example (demonstrating texture memory) runs extremely slowly on my computer (using a gtx 550 ti with windows vista). I haven’t made any changes to the code, and it takes about 4 seconds between frames, whereas it should take about 20 ms or so per frame, according to the book. Does anyone have any idea what could be causing the slowdown? I don’t think it’s a problem with the code itself. Any help would be appreciated.

Hi pgnn, have you found the reason of your problem? I am compiling the code using MS Visual Studio 2012 and CUDA 5.0 and the performance is 1230 ms on average per frame! My GPU is GT 555M (3GB). Any help will be appreciated!

compile in release mode? debug builds tend to use local memory a lot, whereas release builds will try to hold stuff in registers unless spilling is forced by register pressure.