Skip to content

Box filter padding updates#597

Merged
kiritigowda merged 70 commits intoROCm:developfrom
Srihari-mcw:box_filter_padding_updates
Sep 16, 2025
Merged

Box filter padding updates#597
kiritigowda merged 70 commits intoROCm:developfrom
Srihari-mcw:box_filter_padding_updates

Conversation

@Srihari-mcw
Copy link
Copy Markdown
Contributor

@Srihari-mcw Srihari-mcw commented Aug 13, 2025

  • Adds nearest neighbors padding for box filter augmentation (Current ToT version had border pixels fading out, the PR attempts to fix the same )
  • Separated the compute functions of all bit depths on both HOST and HIP Backends (Avoids additional bit depth conversions)
  • Templated the compute functions for all filter sizes into one on the HIP Backend which improves/reduces lines of code significantly

Copy link
Copy Markdown
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 comments

@rrawther
Copy link
Copy Markdown
Contributor

rrawther commented Sep 3, 2025

@AryanSalmanpour : Can you please review the HIP code for this PR

Copy link
Copy Markdown
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 resolve all conversations

@LakshmiKumar23
Copy link
Copy Markdown
Contributor

@spolifroni-amd can you fix the docs issue. This is blocking our merge

@kiritigowda kiritigowda merged commit 89de11e into ROCm:develop Sep 16, 2025
4 of 5 checks passed
shahamed pushed a commit that referenced this pull request Oct 7, 2025
* 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 <52214183+r-abishek@users.noreply.github.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
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 <52214183+r-abishek@users.noreply.github.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

* Docs - removing SP6 (#609)

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* Packaging - Remove Meta Package dependency (#610)

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* 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 <hmaddise@ctr2-alola-login-01.amd.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>

* Docs - Updated doxyfile with correct api input path (#614)

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* 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 <hazarathkumar@multicorewareinc.com>
Co-authored-by: Maddisetty <hmaddise@ctr2-alola-login-01.amd.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* 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] <support@github.com>
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] <support@github.com>
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 <srihari@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* 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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ROCm 7.1 - Changelog updates (#625)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Srihari-mcw <96763064+Srihari-mcw@users.noreply.github.com>
Co-authored-by: Abishek <52214183+r-abishek@users.noreply.github.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com>
Co-authored-by: arvindcheru <90783369+arvindcheru@users.noreply.github.com>
Co-authored-by: Maddisetty <hmaddise@ctr2-alola-login-01.amd.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
ManasaDattaT pushed a commit to RooseweltMcW/rpp that referenced this pull request Dec 19, 2025
* 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 <52214183+r-abishek@users.noreply.github.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
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.

8 participants