Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds cache modifier support to the Iris framework's load and store operations. The changes enable fine-grained control over GPU cache behavior during memory operations, allowing developers to optimize performance by specifying how data should be cached across the CU (L1), L2, and LLC levels.
Key changes:
- Enhanced
load()andstore()functions withcache_modifierandvolatileparameters - Added comprehensive test coverage for different cache behaviors (default, writeback, cache global, cache streaming, write-through, and volatile)
- Updated function documentation to explain cache modifier options and their effects on GPU cache hierarchy
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| iris/iris.py | Enhanced load() and store() functions with cache_modifier and volatile parameters, plus detailed documentation |
| tests/unittests/test_load_cache_modifiers.py | New comprehensive test suite covering all cache modifier behaviors and volatile flag |
… function (#230) Signed-off-by: Muhammad Awad <MuhammadAbdelghaffar.Awad@amd.com> Co-authored-by: Muhammad Awad <112003944+mawad-amd@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com>
|
@copilot fix ci errors |
|
@mawad-amd I've opened a new pull request, #310, to work on those changes. Once the pull request is ready, I'll request review from you. |
neoblizz
left a comment
There was a problem hiding this comment.
My high-level comment is that the tests/unittests should simply just check if the correct amdgcn is being generated for the load/stores.
|
@copilot fix the following tests; |
|
I don't remember if I fixed this or not, but cache modifiers do not work on remote accesses. Tests should not test that. Doc strings need to be updated. I don't think we can assert for that. |
It still is an issue because if you do curr_rank -> curr_rank using iris.load, we should be able to use cache-modifiers there? |
Yes, correct. Local ops should work fine. Remote ops are not allowed to have cache modifiers. Something like this won't work and I was initially testing for it: |
Motivation
This PR introduces support for cache modifiers and volatile flags in Iris' distributed memory operations (
load,store,get,put).The goal is to provide fine-grained control over caching behavior at different cache levels. This allows developers to have fine grained control over caching behavoir.
Technical Details
Changes include:
loadwithcache_modifierandvolatileoptions.storewithcache_modifier.getandputwith bothload_cache_modifierandstore_cache_modifier.tests/run_tests_distributed.pyto correctly forward worker exit codes.volatileoption.Test Plan
I added comprehensive tests under
tests/unittests:test_load_cache_modifiers.py– verifiesiris.loadwith all cache modifiers and volatile settings.test_store_cache_modifiers.py– verifiesiris.storewith all store cache modifiers across ranks.test_get_cache_modifiers.py– verifiesiris.getwith load/store cache modifier combinations.test_put_cache_modifiers.py– verifiesiris.putwith load/store cache modifier combinations.Each test checks correctness by comparing against expected tensors across distributed ranks.
Test Result
See CI
Submission Checklist