Performance Impact of Control Divergence Boundary condition checks are vital for complete functionality and robustness of parallel code The tiled matrix multiplication kernel has many boundary condition checks The concern is that these checks may cause significant performance degradation For example,see the tile loading code below: if(Row Width &p TILE WIDTH+tx Width){ ds_M[ty][tx]M[Row Width p TILE_WIDTH tx]; else ds_M[ty][tx]=0.0; 3 if (p*TILE_WIDTH+ty Width &Col Width){ ds_N[ty][tx]N[(p*TILE_WIDTH ty)Width Col]; else ds_N[ty][tx]=0.0; 电子神越女学 O16 Performance Impact of Control Divergence – Boundary condition checks are vital for complete functionality and robustness of parallel code – The tiled matrix multiplication kernel has many boundary condition checks – The concern is that these checks may cause significant performance degradation – For example, see the tile loading code below: if(Row < Width && p * TILE_WIDTH+tx < Width) { ds_M[ty][tx] = M[Row * Width + p * TILE_WIDTH + tx]; } else { ds_M[ty][tx] = 0.0; } if (p*TILE_WIDTH+ty < Width && Col < Width) { ds_N[ty][tx] = N[(p*TILE_WIDTH + ty) * Width + Col]; } else { ds_N[ty][tx] = 0.0; }