tags:

views:

75

answers:

2

what is the difference between coalescence and bank conflicts when programming with cuda?
is it only that coalescence happens at the global memory while bank conflicts at the shared memory?
should i worry about coalescence, if i have a >1.2 supported gpu? does it handle coalescence by itself?

+1  A: 

Yes, coalesced reads/writes are applicable to global reads and bank conflicts are applicable to shared memory reads/writes.

Different compute capability devices have different behaviours here, but a 1.2 GPU still needs care to ensure that you're coalescing reads and writes - it's just that there are some optimisations to make stuff easier for you

You should read the CUDA Best Practices guide. This goes into lots of detail about both these issues.

Edric
A: 

Yes: coalesced accesses are relevant to global memory only, bank conflicts are relevant to shared memory only.

Check out also the Advanced CUDA C training session, the first section goes into some detail to explain how the hardware in >1.2 GPUs help you and what optimisations you still need to consider. It also explains shared memory bank conflicts too. Check out this recording for example.

The scan and reduction samples in the SDK also explain shared memory bank conflicts really well with progressive improvements to a kernel.

Tom