From 420923e16f223d19224cbecaae96a14a77fa97c1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Dec 2025 14:01:05 +0000 Subject: [PATCH 1/4] Initial plan From c2413f51951a6d7c9cda553f6d7dca033b2a06b4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Dec 2025 15:12:26 +0000 Subject: [PATCH 2/4] Fix pointer dtype casting in iris.copy function The copy function was incorrectly using src_ptr.dtype when casting the translated destination pointer. It should use dst_ptr.dtype to ensure type correctness. This fixes the test failure in test_copy_cache_modifiers[None-.wb] where rank 2, slot 0 was seeing incorrect values due to the wrong pointer type being used. Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com> --- iris/iris.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iris/iris.py b/iris/iris.py index 76da934e..b0686159 100644 --- a/iris/iris.py +++ b/iris/iris.py @@ -1873,7 +1873,7 @@ def copy( to_base_byte = tl.cast(to_base, tl.pointer_type(tl.int8)) translated_src = tl.cast(from_base_byte + src_offset, src_ptr.dtype) - translated_dst = tl.cast(to_base_byte + dst_offset, src_ptr.dtype) + translated_dst = tl.cast(to_base_byte + dst_offset, dst_ptr.dtype) data = tl.load(translated_src, mask=mask, cache_modifier=load_cache_modifier) tl.store(translated_dst, data, mask=mask, cache_modifier=store_cache_modifier) From 2f07863846accd053812d3fbc34855bab3779608 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Dec 2025 15:15:01 +0000 Subject: [PATCH 3/4] Configure CI workflows to run on any PR from any branch Updated all CI workflows to trigger on pushes and pull requests from any branch: - iris-tests.yml: Removed branch restrictions - iris-external-validation-test.yml: Removed branch restrictions - iris-performance-regression-test.yml: Removed branch restrictions - docs.yml: Removed branch restrictions (kept path filters) This ensures comprehensive CI coverage for all pull requests regardless of source or target branch, improving code quality and catching issues earlier. Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com> --- .github/workflows/docs.yml | 2 -- .github/workflows/iris-external-validation-test.yml | 2 -- .github/workflows/iris-performance-regression-test.yml | 2 -- .github/workflows/iris-tests.yml | 2 -- 4 files changed, 8 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4e7dd3da..44b8550d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,14 +2,12 @@ name: Build and Deploy Documentation on: push: - branches: [ main ] paths: - 'docs/**' - 'iris/**' - 'examples/**' - '.github/workflows/docs.yml' pull_request: - branches: [ main ] paths: - 'docs/**' - 'iris/**' diff --git a/.github/workflows/iris-external-validation-test.yml b/.github/workflows/iris-external-validation-test.yml index 655d13f6..44ae940b 100644 --- a/.github/workflows/iris-external-validation-test.yml +++ b/.github/workflows/iris-external-validation-test.yml @@ -2,9 +2,7 @@ name: Iris External Validation Test on: push: - branches: [ main ] pull_request: - branches: [ main ] workflow_dispatch: concurrency: diff --git a/.github/workflows/iris-performance-regression-test.yml b/.github/workflows/iris-performance-regression-test.yml index 137ee2d0..8d3b36c4 100644 --- a/.github/workflows/iris-performance-regression-test.yml +++ b/.github/workflows/iris-performance-regression-test.yml @@ -2,9 +2,7 @@ name: Iris Performance Regression Test on: push: - branches: [ main ] pull_request: - branches: [ main ] workflow_dispatch: concurrency: diff --git a/.github/workflows/iris-tests.yml b/.github/workflows/iris-tests.yml index 0e4b4da3..828f4716 100644 --- a/.github/workflows/iris-tests.yml +++ b/.github/workflows/iris-tests.yml @@ -2,9 +2,7 @@ name: Iris Tests on: push: - branches: [ main ] pull_request: - branches: [ main ] workflow_dispatch: concurrency: From 04141a697a986448a4f8ea31c3a3e58b4a4e1cc1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Dec 2025 15:43:50 +0000 Subject: [PATCH 4/4] Fix copy function to use __translate helper for address translation The copy function was manually implementing address translation which had bugs. Replaced the manual implementation with calls to __translate() helper, matching the pattern used by put() and get() functions. This correctly translates: - src_ptr from cur_rank's address space to from_rank's address space - dst_ptr from cur_rank's address space to to_rank's address space This fixes the test_copy_cache_modifiers[None-.wb] failure. Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com> --- iris/iris.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/iris/iris.py b/iris/iris.py index b0686159..0ddb8e8c 100644 --- a/iris/iris.py +++ b/iris/iris.py @@ -1858,22 +1858,11 @@ def copy( >>> iris.copy(remote_ptr, local_ptr, from_rank, to_rank, to_rank, heap_bases) """ - cur_base = tl.load(heap_bases + cur_rank) - - from_base = tl.load(heap_bases + from_rank) - to_base = tl.load(heap_bases + to_rank) - - src_ptr_int = tl.cast(src_ptr, tl.uint64) - src_offset = src_ptr_int - cur_base - - dst_ptr_int = tl.cast(dst_ptr, tl.uint64) - dst_offset = dst_ptr_int - cur_base - - from_base_byte = tl.cast(from_base, tl.pointer_type(tl.int8)) - to_base_byte = tl.cast(to_base, tl.pointer_type(tl.int8)) - - translated_src = tl.cast(from_base_byte + src_offset, src_ptr.dtype) - translated_dst = tl.cast(to_base_byte + dst_offset, dst_ptr.dtype) + # Translate src_ptr from cur_rank's address space to from_rank's address space + translated_src = __translate(src_ptr, cur_rank, from_rank, heap_bases) + + # Translate dst_ptr from cur_rank's address space to to_rank's address space + translated_dst = __translate(dst_ptr, cur_rank, to_rank, heap_bases) data = tl.load(translated_src, mask=mask, cache_modifier=load_cache_modifier) tl.store(translated_dst, data, mask=mask, cache_modifier=store_cache_modifier)