Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indirect Memory Prefetcher only performs a single indirect prefetch even if the prefetch distance is bigger than 1 #1050

Open
sapphi-red opened this issue Apr 21, 2024 · 2 comments · May be fixed by #1098
Labels

Comments

@sapphi-red
Copy link

Describe the bug
Indirect Memory Prefetcher does not work as expected.
Even if max_prefetch_distance is bigger than 1, it only performs a single indirect prefetch.

Affects version
Since the version Indirect Memory Prefetcher was added,
to the current develop branch (c54039d).

gem5 Modifications
None

To Reproduce

for (int delta = 1; delta < distance; delta += 1) {
Addr pf_addr = pt_entry->baseAddr +
(pt_entry->index << pt_entry->shift);
addresses.push_back(AddrPriority(pf_addr, 0));
}

In this for-loop, the same address is pushed to addresses.

Expected behavior

If I understand the paper correctly, the prefetcher should perform multiple indirect prefetch.
The code would be something like:

 for (int delta = 1; delta < distance; delta += 1) {
     Addr index = pfi.getData(b_base_address + b_item_size * delta) // value of B[i + delta]
     Addr pf_addr = pt_entry->baseAddr + 
         (index << pt_entry->shift); 
     addresses.push_back(AddrPriority(pf_addr, 0)); 
 } 

At least, I guess it doesn't make sense to push the same address to addresses.

Host Operating System
N/A

Host ISA
N/A

Compiler used
N/A

Additional information
None

@sapphi-red sapphi-red added the bug label Apr 21, 2024
@anooprac
Copy link

anooprac commented May 1, 2024

My partner and I are UT Ausitn students working on open source contributions for a class project. Could I be assigned to this to test fixes for this bug?

@anooprac
Copy link

anooprac commented May 3, 2024

Instead of pt_entry->index, it should be B[pt_entry->index + delta], but how can I access the index array B?

@anooprac anooprac linked a pull request May 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants