Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bugfix - Handle#600

Merged
kiritigowda merged 14 commits intoROCm:developfrom
r-abishek:ar/bugfix_handle
Sep 17, 2025
Merged

Bugfix - Handle#600
kiritigowda merged 14 commits intoROCm:developfrom
r-abishek:ar/bugfix_handle

Conversation

@r-abishek
Copy link
Member

Add bugfix in handle - add missing deletes.

Maddisetty and others added 2 commits August 4, 2025 02:58
Copy link
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 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->impl to nullptr after 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
Copy link

codecov bot commented Aug 26, 2025

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     
Files with missing lines Coverage Δ
src/modules/handle_api.cpp 62.50% <100.00%> (+4.36%) ⬆️
src/modules/handle_hip.cpp 70.92% <100.00%> (+0.21%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@rrawther rrawther left a comment

Choose a reason for hiding this comment

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

please address the review comments

Copy link
Contributor

@rrawther rrawther left a comment

Choose a reason for hiding this comment

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

Added a comment

@kiritigowda
Copy link
Collaborator

@r-abishek please resolve conversations to merge this into develop

@kiritigowda kiritigowda merged commit 049da9e into ROCm:develop Sep 17, 2025
6 of 8 checks passed
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]>
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.

6 participants