Sequential code in kernal ? Does it still run ?

I have a sequential application with some for loops. (say matrix multiplication with 3 loops). The CUDA version of the same application makes use of parallel threads to speed the matrix multiplication.

so, my question is, if I run on the graphic card with just one thread and put the sequential code in the kernal function, will it still run (without using the threadIdx, blockIdx variables) and will the execution time be same as the sequential application ?

Thanks… :)

It will work. But it will be “dead” slow!!!

You are basically executing @ 1.35Ghz/4 = 337Mhz - assuming that you r using a GPU with a 1.35Ghz speed (most likely case)

So, when compared to your 2GHz CPU, you would run almost 6 to 7 times slow… or even worser (because of absence of caching)

Best Regards,
Sarnath aka Chitti Miriyalu