Skip to content

Conversation

mawad-amd
Copy link
Collaborator

@mawad-amd mawad-amd commented Sep 11, 2025

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:

  • Extended load with cache_modifier and volatile options.
  • Extended store with cache_modifier.
  • Extended get and put with both load_cache_modifier and store_cache_modifier.
  • Docstrings updated to document supported values and behavior.
  • Fixed error propagation in tests/run_tests_distributed.py to correctly forward worker exit codes.
  • Added new unit tests covering all cache modifier combinations and volatile option.

Test Plan

I added comprehensive tests under tests/unittests:

  • test_load_cache_modifiers.py – verifies iris.load with all cache modifiers and volatile settings.
  • test_store_cache_modifiers.py – verifies iris.store with all store cache modifiers across ranks.
  • test_get_cache_modifiers.py – verifies iris.get with load/store cache modifier combinations.
  • test_put_cache_modifiers.py – verifies iris.put with load/store cache modifier combinations.

Each test checks correctness by comparing against expected tensors across distributed ranks.

Test Result

See CI

Submission Checklist

mawad-amd and others added 3 commits September 10, 2025 17:42
Signed-off-by: Muhammad Awad <MuhammadAbdelghaffar.Awad@amd.com>
@mawad-amd mawad-amd requested a review from neoblizz as a code owner September 11, 2025 08:08
@Copilot Copilot AI review requested due to automatic review settings September 11, 2025 08:08
@mawad-amd mawad-amd requested a review from BKP as a code owner September 11, 2025 08:08
@github-actions github-actions bot added in-progress We are working on it iris Iris project issue labels Sep 11, 2025
@mawad-amd mawad-amd changed the title Muhaawad/cache modifiers Introduce cache modifiers Sep 11, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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 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() and store() functions with cache_modifier and volatile parameters
  • 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

@mawad-amd mawad-amd marked this pull request as draft September 11, 2025 08:19
@mawad-amd mawad-amd marked this pull request as ready for review September 14, 2025 05:54
@mawad-amd mawad-amd requested a review from Copilot September 14, 2025 05:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

@mawad-amd mawad-amd requested a review from Copilot September 14, 2025 06:03
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress We are working on it iris Iris project issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant