Skip to content

SWDEV-558839 - Implement hipMemPrefetchBatchAsync API - #1626

Merged
marandje merged 3 commits into
developfrom
users/marandje/prefetch_batch
Apr 2, 2026
Merged

marandje merged 3 commits into
developfrom
users/marandje/prefetch_batch

Conversation

@marandje

@marandje marandje commented Oct 30, 2025 •

Copy link
Copy Markdown
Contributor

Motivation

Add hipMemPrefetchBatchAsync api in parity with cuMemPrefetchBatchAsync from cuda v13.0

Technical Details

  • Validates input parameters (null checks, count validation, index ordering)
  • Maps batch operations to their corresponding prefetch locations
  • Backend executes individual HSA prefetch operations (might need a new ROCR API for batched prefetch)

Test Plan

Verify parameter validation, successful batch prefetching to multiple locations, compatibility with both managed and device memory...

Test Result

All validation and functional tests pass with correct asynchronous prefetch behavior and proper error handling.

Submission Checklist

@marandje
marandje force-pushed the users/marandje/prefetch_batch branch from 833c88a to d2a330a Compare November 3, 2025 15:16
@marandje
marandje marked this pull request as ready for review November 3, 2025 15:16
@marandje
marandje requested review from a team as code owners November 3, 2025 15:16
@marandje
marandje force-pushed the users/marandje/prefetch_batch branch 2 times, most recently from 36647fd to b5bb605 Compare November 4, 2025 08:48
@marandje
marandje requested a review from AidanBeltonS November 4, 2025 09:02

@AidanBeltonS AidanBeltonS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Implementation looks good. Thanks! Some comments/questions.
I think you may also need some changes to rocprofiler to prevent breaks, see Sebastians changes in #1221

Comment thread projects/clr/hipamd/src/hip_hmm.cpp Resolved

@AidanBeltonS AidanBeltonS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comments addressed, LGTM!

This comment was marked as outdated.

@marandje
marandje force-pushed the users/marandje/prefetch_batch branch 3 times, most recently from 9ad4b0b to 9eb377a Compare November 20, 2025 22:09
ammallya pushed a commit that referenced this pull request Jan 22, 2026
…peed (#1626)

* Fixed parsing of env var lists which were overwriting the mutable env var string and polluting future parses.

* Fixed all tests to obey UT_DATATYPES and UT_REDOPS filters.

* Allow tests to bail early via `GTEST_SKIP` if UT_DATATYPES or UT_REDOPS filters give a test size of zero. This allows tests to run much faster with filters on.

* Wrapped the support checks in helper functions on `TestBed`.

[ROCm/rccl commit: 18e9ad9]
@marandje
marandje force-pushed the users/marandje/prefetch_batch branch 5 times, most recently from f46b73b to 7e5b834 Compare February 3, 2026 09:43
@marandje
marandje force-pushed the users/marandje/prefetch_batch branch 2 times, most recently from 0ede9bb to f83b143 Compare February 10, 2026 09:11
@marandje
marandje force-pushed the users/marandje/prefetch_batch branch 2 times, most recently from 00291b3 to 6e33e61 Compare February 18, 2026 09:36
@marandje
marandje force-pushed the users/marandje/prefetch_batch branch from 6e33e61 to e7a63bd Compare February 23, 2026 09:11
@marandje
marandje force-pushed the users/marandje/prefetch_batch branch 4 times, most recently from 27f2cd6 to 4ae3fea Compare February 27, 2026 14:27
@marandje
marandje force-pushed the users/marandje/prefetch_batch branch 9 times, most recently from 8ea1fb9 to d5f89b8 Compare March 10, 2026 14:37

@venkat1361 venkat1361 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

rocprofiler-sdk changes looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants