AIRUNTIME-70 - Disable memory object ref counting for HIP in DD mode#3023
Merged
AIRUNTIME-70 - Disable memory object ref counting for HIP in DD mode#3023
Conversation
Refcounters can delay memory object destruction, which affect some logic in the apps, written with CUDA's expectations in the behavior.
chrispaquot
approved these changes
Feb 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR disables memory object reference counting for HIP in Direct Dispatch (DD) mode to align with CUDA's memory management behavior, preventing delayed memory object destruction that can affect application logic.
Changes:
- Added conditional guards around
retain()andrelease()calls to skip reference counting whenamd::IS_HIP && AMD_DIRECT_DISPATCHis true - Removed unused variable declaration in
rocvirtual.cpp
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| projects/clr/rocclr/platform/kernel.cpp | Wraps memory object retain/release calls in kernel parameter handling with HIP DD mode checks |
| projects/clr/rocclr/platform/command.hpp | Wraps memory object retain/release calls in various command classes with HIP DD mode checks |
| projects/clr/rocclr/device/rocm/rocvirtual.cpp | Removes unused memories variable declaration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rakesroy
pushed a commit
that referenced
this pull request
Feb 11, 2026
…3023) Refcounters can delay memory object destruction, which affect some logic in the apps, written with CUDA's expectations in the behavior.
rakesroy
pushed a commit
that referenced
this pull request
Feb 11, 2026
…3023) Refcounters can delay memory object destruction, which affect some logic in the apps, written with CUDA's expectations in the behavior.
1 task
amd-josnarlo
pushed a commit
that referenced
this pull request
Feb 23, 2026
…3023) Refcounters can delay memory object destruction, which affect some logic in the apps, written with CUDA's expectations in the behavior.
systems-assistant bot
pushed a commit
to ROCm/clr
that referenced
this pull request
Feb 27, 2026
DD mode (#3023) Refcounters can delay memory object destruction, which affect some logic in the apps, written with CUDA's expectations in the behavior. [rocm-systems] ROCm/rocm-systems#3023 (commit c760ae7)
px1624
pushed a commit
to ROCm/clr
that referenced
this pull request
Mar 20, 2026
DD mode (#3023) Refcounters can delay memory object destruction, which affect some logic in the apps, written with CUDA's expectations in the behavior. [rocm-systems] ROCm/rocm-systems#3023 (commit c760ae7)
px1624
pushed a commit
to ROCm/clr
that referenced
this pull request
Mar 27, 2026
DD mode (#3023) Refcounters can delay memory object destruction, which affect some logic in the apps, written with CUDA's expectations in the behavior. [rocm-systems] ROCm/rocm-systems#3023 (commit c760ae7)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Refcounters can delay memory object destruction, which affect some logic in the apps, written with CUDA's expectations in the behavior.
Technical Details
Disable memory object ref counting for HIP in DD mode
JIRA ID
AIRUNTIME-70
Test Plan
N/A
Test Result
N/A
Submission Checklist
N/A