Skip to content

AIRUNTIME-70 - Disable memory object ref counting for HIP in DD mode#3023

Merged
gandryey merged 12 commits intodevelopfrom
amd/dev/gandryey/SWDEV-440746
Feb 18, 2026
Merged

AIRUNTIME-70 - Disable memory object ref counting for HIP in DD mode#3023
gandryey merged 12 commits intodevelopfrom
amd/dev/gandryey/SWDEV-440746

Conversation

@gandryey
Copy link
Copy Markdown
Contributor

@gandryey gandryey commented Feb 2, 2026

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

Refcounters can delay memory object destruction, which affect some logic in the apps, written with CUDA's expectations in the behavior.
@gandryey gandryey requested a review from a team as a code owner February 2, 2026 20:17
Copy link
Copy Markdown
Contributor

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 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() and release() calls to skip reference counting when amd::IS_HIP && AMD_DIRECT_DISPATCH is 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.
JeniferC99 pushed a commit that referenced this pull request Feb 12, 2026
…3023) (#3197)

Refcounters can delay memory object destruction, which affect some logic in the apps, written with CUDA's expectations in the behavior.

Co-authored-by: German Andryeyev <German.Andryeyev@amd.com>
@gandryey gandryey changed the title SWDEV-440746 - Disable memory object ref counting for HIP in DD mode AIRUNTIME-70 - Disable memory object ref counting for HIP in DD mode Feb 12, 2026
@gandryey gandryey merged commit c760ae7 into develop Feb 18, 2026
17 checks passed
@gandryey gandryey deleted the amd/dev/gandryey/SWDEV-440746 branch February 18, 2026 22:38
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)
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.

3 participants