Skip to content

Fix HIP graph launch and runtime edge semantics#155

Open
AWoloszyn wants to merge 3 commits into
mainfrom
users/awoloszyn/graph-launch-runtime-edge
Open

Fix HIP graph launch and runtime edge semantics#155
AWoloszyn wants to merge 3 commits into
mainfrom
users/awoloszyn/graph-launch-runtime-edge

Conversation

@AWoloszyn

Copy link
Copy Markdown
Collaborator

Allow no-argument native HIP kernel launches to be represented consistently across graph and direct stream paths when host stubs provide an empty args-array. Non-empty args-array launches without parameter metadata still fail explicitly instead of inventing an ABI layout.

Tighten graph memcpy and runtime pointer semantics around pooled logical allocation sizes, zero-byte allocation behavior, host-pointer attributes, worker-thread stream copies, event barriers, host-visible allocation backing, and native argument ABI offsets.

Allow no-argument native HIP kernel launches to be represented consistently across graph and direct stream paths when host stubs provide an empty args-array. Non-empty args-array launches without parameter metadata still fail explicitly instead of inventing an ABI layout.

Tighten graph memcpy and runtime pointer semantics around pooled logical allocation sizes, zero-byte allocation behavior, host-pointer attributes, worker-thread stream copies, event barriers, host-visible allocation backing, and native argument ABI offsets.
@AWoloszyn AWoloszyn requested a review from zjgarvey June 29, 2026 19:55

@zjgarvey zjgarvey left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looking at some other callers for iree_hip_validate_memcpy_ranges, I noticed that the hipMemcpy and hipMemcpyAsync pass false for use_hip_visible_pool_size, and wasn't sure if those direct stream paths should use this logical size bound, too.

Comment thread libhrx/src/binding/common/stream.c Outdated
Comment thread libhrx/src/binding/common/module.c Outdated
@AWoloszyn

Copy link
Copy Markdown
Collaborator Author

Thanks, these were valid cleanups. I added follow-up commit 6d437bceb.

  • hipMemcpy and hipMemcpyAsync now use the HIP-visible logical allocation bound, matching the graph memcpy path. That matters for pooled allocations where the backing allocation can be larger than the
    allocation visible through HIP.
  • The duplicated parameter-info empty predicate is now shared. I used it in the pack/unpack paths, but kept the separate “requires parameter storage” check because direct-argument-only metadata is a valid
    state and should not require a packed/list parameter buffer.
  • src_ordinal was redundant; the metadata loop does not skip parameters, so it now uses j directly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants