Previous | Next --- Slide 57 of 116
Back to Lecture Thumbnails
student1

What are some common approaches towards pre-fetching? One thing on top of my head is that for a for loop that goes over array value, usually, they are stored nearby, so prefetching could simply load neighborhood data into the cache to prepare for future use. Are there other ways to do pre-fetching?

kayvonf

Another example is picking up on access patterns. If a CPU detects that a program is accessing memory with stride X, then you can imagine how you might predict future accesses.

fdxmw

@student1 i believe the prefetching mechanism you described is called sequential prefetching. stride prefetching, as @kayvonf mentioned, makes sure that the cpu detects the stride using a PC-based table and performs prefetching based on that. there's also a technique called stream prefetching, which is a continuous prefetching mechanism that ensures the cpu always stays several cache lines ahead

brianamb

Is there a ML approach to determining prefetching or is that not necessary because of the above comments?

Please log in to leave a comment.