Merged
Conversation
RPP handle mem leaks Fix
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses a memory leak bug by adding missing delete operations for handle cleanup in the RPP library. The fix ensures proper resource deallocation when destroying handle objects across different backend implementations.
- Adds missing
delete this->GetInitHandle()calls in host and GPU destruction methods - Sets
this->impltonullptrafter deletion to prevent dangling pointer access - Modifies the main API to properly delete the handle object and return success status
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/modules/handle_host.cpp | Adds deletion of init handle and nullifies impl pointer in host cleanup |
| src/modules/handle_hip.cpp | Adds deletion of init handle and nullifies impl pointer in GPU cleanup |
| src/modules/handle_api.cpp | Updates API to delete handle object and return explicit success status |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #600 +/- ##
===========================================
+ Coverage 88.28% 88.30% +0.02%
===========================================
Files 194 194
Lines 81955 81962 +7
===========================================
+ Hits 72348 72371 +23
+ Misses 9607 9591 -16
🚀 New features to boost your workflow:
|
Handle Bugfix PR comments resolution
rrawther
requested changes
Aug 28, 2025
Contributor
rrawther
left a comment
There was a problem hiding this comment.
please address the review comments
rrawther
approved these changes
Sep 11, 2025
Collaborator
|
@r-abishek please resolve conversations to merge this into develop |
shahamed
pushed a commit
that referenced
this pull request
Oct 7, 2025
* Fix handle mem leaks * Add variable to capture rpp::try_ return status * Add handle deletes inside lambda function * modified handle delete --------- Co-authored-by: Maddisetty <[email protected]> Co-authored-by: Kiriti Gowda <[email protected]> Co-authored-by: HazarathKumarM <[email protected]>
jharryma
pushed a commit
that referenced
this pull request
Oct 10, 2025
* Box filter - padding updates (#597) * Updates for box filter to test * Box Filter Newer Commit with fixes * Further updates to match PKD3 and PLN3 output * Fixes for RPP Box filter border replicate - Fix accuracy * Rename variables * Restore AVX and Update AVX code for box filter * Box Filter float updates * Updates to float version * Compilation fixes * HIP Updates for Box Filter kernelSize = 3 * HIP Updates for PLN Code * HIP Updates for kernelSize = 5 * HIP Updates for kernelSize = 7 * HIP Updates for kernelSize = 9 * Remove additional else * Fix issues with alignedLength for kernelSize 3 float variants PKD3 to PLN3 * Add golden outputs * Add additional borderType parameter * Separate float implementation for 3x3 box filter planar * Rename function * Introduce functions to calculate in float type itself * Updates for PKD variants * Compilation fixes * Updates for PKD3 to PLN3 * Fix accuracy issues * PLN3 to PKD3 updates for box filter * Float shared variables * Overload box filter for various kernelSizes * Template the PKD3 and PLN3 implementations * Template the rest of the implementations * Initial cleanup of HIP Code * Cleanup of code with parameter passing launch of kernel * Add further comments * Add more comments and minor cleanups further * Initial cleanup of cpu kernel code * Add comments for padding * Add reference outputs in docs/data/doxygenOutputs * Update documentation * Minor corrections * Updates to move filter structure as common code * Update the separation based on type * Update rpp_hip_load_store.hpp * Updates for separating i8 for PLN3 code * Fixes for PLN3 and further updates for kernelSize = 3 * I8 updates for kernelSize = 5 * Updates for kernelSize = 7 * Updates for kernelSize = 9 * Fixes for kernelSize = 9 * Remove saturate pixel * Rename function * Update comment * Add declarations for I8 functions with rounding * Whitespace and type updates * Updates for performance - U8/I8 * Templated the box filter compute functions for all kernel sizes and optimized the I8 variants * Update comments * Make initial changes to template unpack function * Fixes for box filter compilation * modified padding load logic * Update the round function used * Rename verticalDirection and horizontalDirection to padVertical and padHorizontal * Fix accuracy issues --------- Co-authored-by: Abishek <[email protected]> Co-authored-by: HazarathKumarM <[email protected]> Co-authored-by: Kiriti Gowda <[email protected]> Co-authored-by: Lakshmi Kumar <[email protected]> * Docs - removing SP6 (#609) Co-authored-by: Kiriti Gowda <[email protected]> * Packaging - Remove Meta Package dependency (#610) Co-authored-by: Kiriti Gowda <[email protected]> * Bugfix - Handle (#600) * Fix handle mem leaks * Add variable to capture rpp::try_ return status * Add handle deletes inside lambda function * modified handle delete --------- Co-authored-by: Maddisetty <[email protected]> Co-authored-by: Kiriti Gowda <[email protected]> Co-authored-by: HazarathKumarM <[email protected]> * Docs - Updated doxyfile with correct api input path (#614) Co-authored-by: Kiriti Gowda <[email protected]> * Test Package - Add cmake deps (#617) * Solarize augmentation - HOST and HIP (#605) * Solarize HIP and HOST implementation * cleanup the code and fix pkd3-pkd3 performance * Add golden output and doxygen comments * Add cheks for Threshold param * modified case num for solarize * minor fix * fix load/store calls * Address review comments * minor fix --------- Co-authored-by: HazarathKumarM <[email protected]> Co-authored-by: Maddisetty <[email protected]> Co-authored-by: Kiriti Gowda <[email protected]> * Docs - Bump rocm-docs-core[api_reference] from 1.23.0 to 1.24.1 in /docs/sphinx (#620) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.23.0 to 1.24.1. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.24.1/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.23.0...v1.24.1) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-version: 1.24.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Docs - Bump rocm-docs-core[api_reference] from 1.24.1 to 1.25.0 in /docs/sphinx (#622) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.24.1 to 1.25.0. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.25.0/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.24.1...v1.25.0) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-version: 1.25.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Warning fixes for HIP Backend - Check return status (#606) * Initial hip memory fixes * Further hip warning fixes * Default build warning fixes - group III --------- Co-authored-by: Srihari-mcw <[email protected]> Co-authored-by: Kiriti Gowda <[email protected]> * Docs - Bump rocm-docs-core[api_reference] from 1.25.0 to 1.26.0 in /docs/sphinx (#623) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.25.0 to 1.26.0. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.26.0/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.25.0...v1.26.0) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-version: 1.26.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ROCm 7.1 - Changelog updates (#625) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Srihari-mcw <[email protected]> Co-authored-by: Abishek <[email protected]> Co-authored-by: HazarathKumarM <[email protected]> Co-authored-by: Lakshmi Kumar <[email protected]> Co-authored-by: spolifroni-amd <[email protected]> Co-authored-by: arvindcheru <[email protected]> Co-authored-by: Maddisetty <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Srihari-mcw <[email protected]>
ManasaDattaT
pushed a commit
to RooseweltMcW/rpp
that referenced
this pull request
Dec 19, 2025
* Fix handle mem leaks * Add variable to capture rpp::try_ return status * Add handle deletes inside lambda function * modified handle delete --------- Co-authored-by: Maddisetty <[email protected]> Co-authored-by: Kiriti Gowda <[email protected]> Co-authored-by: HazarathKumarM <[email protected]>
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.
Add bugfix in handle - add missing deletes.