Repository navigation
fix(clr): match SVM frees by range so hipFree accepts offset pointers - #12525
Merged
Merged
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Targeted regression tests for offset and boundary pointers are missing.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Updates SVM allocation tracking so hipFree and hipHostFree can release allocations using interior pointers.
Changes:
- Finds SVM allocations by address range.
- Resolves interior pointers to their allocation base before freeing.
| File | Description |
|---|---|
projects/clr/rocclr/platform/memory.hpp |
Updates the internal removal signature. |
projects/clr/rocclr/platform/memory.cpp |
Implements range lookup and base-pointer freeing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mangupta
reviewed
Oct 1, 2026
satyanveshd
force-pushed
the
users/sdittaka/fixhipfree
branch
from
October 1, 2026 07:51
35b367a to
a9acc8b
Compare
Contributor
|
🤖 AI-assisted pre-review (for @mangupta) Re-reviewed the updated head ( |
chrispaquot
reviewed
Oct 6, 2026
chrispaquot
reviewed
Oct 6, 2026
chrispaquot
approved these changes
Oct 8, 2026
systems-assistant Bot
pushed a commit
to ROCm/clr
that referenced
this pull request
Oct 8, 2026
pointers (#12525) ## Motivation Address regressions with hipFree/hipHostFree when a pointer offset to the base pointer is passed. ## Technical Details Do not just check the passed pointer if it matches with the base pointer, while removing the pointers from svm buffer map. Instead check if that pointer is in the range of the allocation and remove if it is so. ## Issue Tracking JIRA ID: ROCM-31847 ## Test Plan HACC single gpu tests should run fine. ## Test Result PASS ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md. [rocm-systems] ROCm/rocm-systems#12525 (commit a970e27)
Contributor
TheRock Submodule Bump ActivityNewest first
|
anujshuk-amd
pushed a commit
that referenced
this pull request
Oct 12, 2026
…#12525) ## Motivation Address regressions with hipFree/hipHostFree when a pointer offset to the base pointer is passed. ## Technical Details Do not just check the passed pointer if it matches with the base pointer, while removing the pointers from svm buffer map. Instead check if that pointer is in the range of the allocation and remove if it is so. ## Issue Tracking JIRA ID: ROCM-31847 ## Test Plan HACC single gpu tests should run fine. ## Test Result PASS ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
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
Address regressions with hipFree/hipHostFree when a pointer offset to the base pointer is passed.
Technical Details
Do not just check the passed pointer if it matches with the base pointer, while removing the pointers from svm buffer map. Instead check if that pointer is in the range of the allocation and remove if it is so.
Issue Tracking
JIRA ID: ROCM-31847
Test Plan
HACC single gpu tests should run fine.
Test Result
PASS
Submission Checklist