by WithinReason · 3y ago · 0 comments
__shared__ float As[(CHUNKSIZE+1) * CHUNKSIZE];
If CHUNKSIZE is a power of 2 this will eliminate bank conflicts.In general I'm still confused about whether vectorized load instructions (LDS.128) necessarily lead to bank conflicts or not. My impression was that consecutive 32b floats get mapped to different banks, so to avoid conflicts I'd want the warp to load 32*32b consecutive elements at each step.
__shared__ float As[(CHUNKSIZE+4) \* CHUNKSIZE]
Ultimately it's down to trial and error, like always with GPGPU.