Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of bandwidth in CUDA and why it is important

Tags:

The CUDA programming guide states that

"Bandwidth is one of the most important gating factors for performance. Almost all changes to code should be made in the context of how they affect bandwidth."

It goes on to calculate theoretical bandwidth which is in the order of hundreds of gigabytes per second. I am at a loss as to why how many bytes one can read/write to global memory is a reflection of how well optimised a kernel is.

If I have a kernel which does intensive computation on data stored in shared memory and/or registers, with only a single read at the start and write out at the end from and to global memory, surely the effective bandwidth will be small, while the kernel itself may be very efficient.

Could any one further explain bandwidth in this context?

Thanks

like image 466
zenna Avatar asked Mar 04 '10 17:03

zenna


1 Answers

most all nontrivial computational kernels, in CPU and GPU land, memory bound. GPU has very high computational intensity and throughput, but access to main memory is very slow and has high latency, few hundred cycles per read/store versus four cycles for mmany arithmetic operations.

It sounds like your kernel is computation bound, so your luck. However you still have to watch out for shared memory bank conflict, which can serialize portions of code unexpectedly.

like image 91
Anycorn Avatar answered Oct 11 '22 19:10

Anycorn