Modeling perfect prefetcher in sniper

220 views
Skip to first unread message

Neelam Sharma

unread,
Feb 5, 2021, 1:45:49 AM2/5/21
to Sniper simulator
Hi,

I want to model a perfect prefetcher in sniper. According to my understanding, a perfect prefetcher is one that knows what to prefetch and gets hits on the prefetched data. 
It will be very useful if anyone can give me a starting point to do so in sniper.

Regards,
Neelam 

Trevor E. Carlson

unread,
Feb 5, 2021, 1:55:35 AM2/5/21
to snip...@googlegroups.com, Neelam Sharma
Neelam,

     Is your ultimate goal to model the performance results of a system that has a perfect prefetcher in it? Or is your goal to understand the inner workings of a perfect prefetcher?

     To accomplish the first part, you can set the L1-D cache to be perfect, and it will act like a perfect prefetcher has been enabled to the L1. You could set any layer of the cache hierarchy to be perfect, which would emulate a perfect prefetcher at that level.

Let me know if you have any other questions,
Trevor

On Feb 5, 2021, at 2:45 PM, Neelam Sharma <sapphire....@gmail.com> wrote:

Hi,
--
--
--
You received this message because you are subscribed to the Google
Groups "Sniper simulator" group.
To post to this group, send email to snip...@googlegroups.com
To unsubscribe from this group, send email to
snipersim+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/snipersim?hl=en

---
You received this message because you are subscribed to the Google Groups "Sniper simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snipersim+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/snipersim/de40cc19-cb6f-4cc3-b048-256201450665n%40googlegroups.com.

Neelam Sharma

unread,
Feb 8, 2021, 4:18:19 AM2/8/21
to Sniper simulator
Hi,

My goal is to model perfect prefetcher.
Does a perfect cache in snipersim it is not taken to be of infinite capacity?

I understand the working of perfect cache and perfect prefetcher as:
Perfect cache: Compulsory misses are accounted but there are no conflict or capacity misses and it also considers infinite network bandwidth such that it can get the data from memory but only accounts for L<level> (level is 1 for L1 cache, 2 for L2 cache etc) access time. So, it will kind of model infinite cache capacity.
Perfect prefetcher apart from above definition also accounts for finite network bandwidth and finite cache capacity but the misses will not occur at a particular cache level where prefetcher is used.


Please correct me if I am wrong.

Regards,
Neelam

Trevor E. Carlson

unread,
Feb 8, 2021, 9:49:41 PM2/8/21
to snip...@googlegroups.com, Neelam Sharma
Neelam,

In this case, our definitions diverge a bit here. In Sniper, our perfect cache is not an infinite sized one, but an oracle cache that will always hit.

If you’d like to quickly model your definition of a perfect cache, you could specify a very large cache as your L1 that can fit your application’s working set. You’ll need enough memory to support the bookkeeping of that cache, but it will allow you to model the compulsory misses of your workload.

At the moment, I’m not yet sure how to handle modeling a perfect prefetcher. By the time you need the data inside the core, it should have already consumed the network bandwidth and cache capacity of the system. It seems that it would be too late to handle this, and you might need some sort of reversible / checkpoint-based simulation infrastructure to support this. Are you familiar with solutions on how to model your definition of a perfect prefetcher?

Trevor

Neelam Sharma

unread,
Feb 15, 2021, 12:19:20 AM2/15/21
to Sniper simulator

Hi,


Thanks for your inputs related to prefetch cache/prefetcher. 


I am getting above doubts about differences in these definitions because I have read a paper “IMP: Indirect memory prefetcher” in which:


“Ideal cache: It is equivalent to a system with perfect prefetching and infinite memory and network bandwidth.

Perfect prefetcher: Perfect Prefetching is a weaker idealized configuration with a magic memory prefetcher. The prefetcher is able to look into the future and for each memory access, a prefetch request to that address is issued several thousand cycles before the request. Unlike Ideal, this configuration has finite memory and network bandwidth.”


So the perfect prefetcher assumes finite memory and network bandwidth whereas ideal cache models them as infinite.


The points at which we differ in the modelling definitions of a perfect cache/prefetcher is that:


i) perfect_cache also models the network bandwidth and latency. So, is there any way to discount the network bandwidth and latency penalties while modelling the perfect cache?


ii) If not, then to model a perfect cache I need to increase the size of the cache accordingly to fit the working data set of my application. Can you please point me to a technique to determine the working data set size?

Reply all
Reply to author
Forward
0 new messages