93
edits
Changes
m
→Assignment 3
The first quick method to try and improve it was to change the block size. Playing with the block size changed the kernel run times, but it wasn't apparent what exactly causes it. Most likely it is due to the 16*16 block configuration being able to not take up all the memory of the SM, but is still large enough that it gives us a boost in execution times. https://devtalk.nvidia.com/default/topic/1026825/how-to-choose-how-many-threads-blocks-to-have-/
[[Media:Assign3assign3-ntpb.png]]
In the end, a block size of 16 by 16 proved to be best for run times.
rotateKernel<<<dGrid, dBlock >>>(d_a, d_b, rows, cols, sin1, cos1);
[[Media:Assign3assign3-sincos.png]]
There may be other variables that could be moved outside the kernel like r0 and c0, but due to time limitations they weren't tested.
[[File:Assignment3_profileassignment3-comparisons.xlsx.txt]]