Changes

Jump to: navigation, search

GPU621/False Sharing

1 byte removed, 17:24, 26 November 2021
Solutions to False Sharing
Assuming a 64 byte cache line, what if each element in the array was the only piece of data in the cache line for each thread? [[File:naive_vs_padded_arr.png|700px|thumb|<br>Array comparison between naïve and padded implementation. Colored blocks represent index handled by individual threads. Grey blocks represent empty space.]]
This observation was the basis to for our first solution to false sharing. The idea was to pad out each element in the array with enough space to act as a boundary or separator for the cache line. If we can force each thread to only bring in their array index to their cache then each individual thread will have a distinct cache line, thus eliminating false sharing.
In the workshop, we accomplished this by making several modifications to the original code:
=== Synchronization ===
 
 
== Conclusion ==
83
edits

Navigation menu