Cache align base addresses and fix address offsets#27
Cache align base addresses and fix address offsets#27radelja wants to merge 5 commits intohpcgarage:masterfrom
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| { "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.
@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.
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.
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 <175728472+Copilot@users.noreply.github.com>
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