-
Notifications
You must be signed in to change notification settings - Fork 3
Cache align base addresses and fix address offsets #27
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Copilot <[email protected]>
src/generators/spatterGenerator.h
Outdated
| { "verbose", "Sets the verbosity of the output", "0" }, | ||
| { "args", "Sets the arguments to describe Spatter pattern(s)", "" }, | ||
| { "datawidth", "Sets the width of the memory operation", "8" }, | ||
| { "cache_line_size", "Size of the cache line the prefetcher is attached to", "64" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@radelja - we wanted to note here that if the user doesn't want aligned addresses they may need to set this value to 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a new align_start_addresses argument instead of requiring cache_line_size to be set to 1 to not align the addresses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request addresses two issues related to memory address handling in the Spatter generator: cache aligning base addresses and fixing address offset calculations. The changes ensure proper cache line alignment for performance and correct address computation in memory access patterns.
- Adds cache line alignment functionality to the base source and target addresses
- Fixes address offset calculations in memory access kernels by incorporating
patternIdx - Updates parameter handling to support 64-bit addresses and alignment configuration
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/generators/spatterGenerator.h | Adds new cache line alignment parameters, alignment function declaration, and updates data types |
| src/generators/spatterGenerator.cc | Implements cache line alignment logic and fixes address offset calculations in gather/scatter kernels |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
This pull request addresses #25 by cache aligning the base addresses of the source and target addresses, and #26 by adding 'patternIdx' to correctly determine the address offsets in the kernels.
cache_line_sizeparameter to the Spatter generator to alignstart_sourceandstart_targetalign_start_addressesparameter to enable or disable cache line alignment of start addresses