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

Skip to content

RPP JPEG Compression Distortion HIP#538

Merged
kiritigowda merged 79 commits intoROCm:developfrom
r-abishek:ar/opt_jpeg_distortion_hip
Apr 30, 2025
Merged

RPP JPEG Compression Distortion HIP#538
kiritigowda merged 79 commits intoROCm:developfrom
r-abishek:ar/opt_jpeg_distortion_hip

Conversation

@r-abishek
Copy link
Member

  • Adds JPEG Compression Distortion augmentation for HIP on U8/F32/F16/I8.
  • Adds relevant unit/perf/QA tests.

dependabot bot and others added 30 commits March 19, 2025 14:20
…ocs/sphinx (#487)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  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>
* adds Fog tensor support

* modified comments

minor fix in HIP kernel

* changed c style casting to static_cast inside HIP kernel

modified few variable names

* added note in documentation

added fog test case to randomOutputCase in HIP and HOST test suites

* Introduced Greyness factor on Host FOG Kernel

* Introduced Greyness factor on HIP Side

* Added Grey scale support for Raw C code and PLN3 variant

* Modified Converstion factor variable

* Doxygen Outputs changed

* Variable name changes

* Changes in HUe Saturation Matrix

* Fix output issue

* Update CHANGELOG.md

Co-authored-by: spolifroni-amd <[email protected]>

* Updates to 1.9.10 including fog feature

---------

Co-authored-by: sampath1117 <[email protected]>
Co-authored-by: Kiriti Gowda <[email protected]>
Co-authored-by: HazarathKumarM <[email protected]>
Co-authored-by: Lakshmi Kumar <[email protected]>
Co-authored-by: Rajy Rawther <[email protected]>
Co-authored-by: spolifroni-amd <[email protected]>
Co-authored-by: Srihari-mcw <[email protected]>
* Make initial changes for raw CPP version of warp perspective

* Fix calls to compute_warp_perspective_src_loc function

* Update changes to go through nearest neighbours case

* AVX HOST codes for warp perspective initial

* Fixes for accuracy in warp perspective

* More fixes for accuracy in warp perspective

* Update the cide for AVX version of Planar to Planar

* Add bilinear u8 host code for warp perspective

* Make updates to include functions for F32 data type

* Make updates to use cast instead of set and fix issues with raw C implementation

* Add i8 host codes

* Add updates for F16 Bilinear Code

* Update the initial HIP code for warp perspective

* Update fixes for HIP code

* Add Warp Perspective Nearest Neighbors F16 code for PKD3_to_PLN3 and PLN3_to_PLN3

* Add updates for PLN to PLN configuration

* Add updates for PKD3 to PKD3 case

* Rename variables

* Update changes to log images separately for Bilinear and Nearest Neighbors

* fixed bug in raw c code of PKD-PLN variant

* minor bug fix for F16 PLN variants

* minor fixes in HOST test suite

* Update the HIP code for review comments and refactoring of device functions

* Update the comments alignment

* Rename functions and add cases in HOST and HIP runTests.py

* Update indentations for compuatations and rename vectors

* Update documentations and add more reference variables

* Make more formatting changes

* Make further updates by including test cases

* Make updates to use reinterpret cast

* Update reinterpret casts for PLN to PLN configuration u8 and i8 codes

* Make updates to enclose code inside AVX2 flag

* Make further changes to update type casting

* Update the version

* Make updates to add warp perspective image

* Modify comments, update CHANGELOG and update flags

* Update further comments in warp perspective

* Add more comments for warp perspective

* Update based on further review comments

* Update the case number for warp_perspective in common.py

* Address review comments

* Make initial changes for raw CPP version of warp perspective

* Fix calls to compute_warp_perspective_src_loc function

* Update changes to go through nearest neighbours case

* AVX HOST codes for warp perspective initial

* Fixes for accuracy in warp perspective

* More fixes for accuracy in warp perspective

* Update the cide for AVX version of Planar to Planar

* Add bilinear u8 host code for warp perspective

* Make updates to include functions for F32 data type

* Make updates to use cast instead of set and fix issues with raw C implementation

* Add i8 host codes

* Add updates for F16 Bilinear Code

* Update the initial HIP code for warp perspective

* Update fixes for HIP code

* Add Warp Perspective Nearest Neighbors F16 code for PKD3_to_PLN3 and PLN3_to_PLN3

* Add updates for PLN to PLN configuration

* Add updates for PKD3 to PKD3 case

* Rename variables

* Update changes to log images separately for Bilinear and Nearest Neighbors

* fixed bug in raw c code of PKD-PLN variant

* minor bug fix for F16 PLN variants

* minor fixes in HOST test suite

* Update the HIP code for review comments and refactoring of device functions

* Update the comments alignment

* Rename functions and add cases in HOST and HIP runTests.py

* Update indentations for compuatations and rename vectors

* Update documentations and add more reference variables

* Make more formatting changes

* Make further updates by including test cases

* Make updates to use reinterpret cast

* Update reinterpret casts for PLN to PLN configuration u8 and i8 codes

* Make updates to enclose code inside AVX2 flag

* Make further changes to update type casting

* Make updates to add warp perspective image

* Modify comments, update CHANGELOG and update flags

* Update further comments in warp perspective

* Add more comments for warp perspective

* Update based on further review comments

* Update the case number for warp_perspective in common.py

* Address review comments

* Fix conflits with warp perspective

* Update version details

* Merge branch 'ar/opt_warp_perspective' of https://github.com/r-abishek/rpp into opt_warp_perspective_rebased

* Update version to 1.9.10 including warp perspective

* Updates to convert to XYWH from LTRB instead of opposite

* Update CHANGELOG.md

Co-authored-by: spolifroni-amd <[email protected]>

* Revert changes and convert to ltrb instead of xywh

---------

Co-authored-by: Srihari-mcw <[email protected]>
Co-authored-by: sampath1117 <[email protected]>
Co-authored-by: Kiriti Gowda <[email protected]>
Co-authored-by: Rajy Rawther <[email protected]>
Co-authored-by: spolifroni-amd <[email protected]>
* Package - remove clang from test

* CMakeLists - remove BUILD_WITH_AMD_ADVANCE

* Package - Add OMP dependency

* Find Packages - Updates

* Test Package - Deps

* Test - backend Info

* Tests - Fix HIP Test Add

* Test - Add HIP Path

* Test - Find HIP Updates

* Tests - Fix HIP compilation
* Jenkins - Fix Test

* Test - Create sepreate test folder

* FileSystem - Find and process

* Find Filesystem - Updates

* Test - Compiler Updates
…ocs/sphinx (#491)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  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>
…ocs/sphinx (#495)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.12.0...v1.12.1)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Test Suite - Fix HIP Link

* Tests - HIP Updates

* Test - Link OpenCV

* Test - Link dir updates

* CMakeLists - Updates

* Test Package - Deps

* CXX Compiler & ROCm path updates

* ROCm Path - Display info

* OpenMP - Updates

* Package Deps - Remove OpenMP
* pthread removal

* c++14 removal

---------

Co-authored-by: Kiriti Gowda <[email protected]>
…ocs/sphinx (#500)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.12.1 to 1.13.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.12.1...v1.13.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  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>
* pthread removal

* c++14 removal

---------

Co-authored-by: Kiriti Gowda <[email protected]>
* Readme - Updates

* Package - Deps to OpenMP
* Rename Tensor_host to Tensor_image_host, and runTests to runImageTests

* Rename Tensor_hip to Tensor_image_hip, and runTests to runImageTests

* Rename all readme runTests.py to runImageTests.py

---------

Co-authored-by: Kiriti Gowda <[email protected]>
Co-authored-by: Srihari-mcw <[email protected]>
* Rename Tensor_host to Tensor_image_host, and runTests to runImageTests

* Rename Tensor_hip to Tensor_image_hip, and runTests to runImageTests

* Rename all readme runTests.py to runImageTests.py

---------

Co-authored-by: Kiriti Gowda <[email protected]>
Co-authored-by: Srihari-mcw <[email protected]>
* added initial support for U8 PLN1-PLN1 variant

* added support for U8 PKD3, PLN3 variants

* modified algorithm to give RGB output for RGB images

* moved common code outside the layout branch conditions

* added support for toggle variation of U8

* added golden output for threshold

* added threshold output for doxygen

* added support for F32 bit depth

* added support for I8 bitdepth

* added F16 bitdepth support

* added HIP support for U8 bitdepth

* made changes to support remaining bitdepths

* fixed output issues with I8 variant

* removed commented code in HOST

* added threshold test case in maps used in common.py

* modified RPP_VERSION_MINOR value and changelog

* fixed issues with doxygen

modified globalThreads_x value for HIP kernel

* made changes in I8 variants as per review comments

* added more details for threshold documentation

* Update version to 1.9.10 including threshold

* Remove duplicate definitions of functions and minor bug fix

* Minor docs fix

* Minor docs fix

---------

Co-authored-by: sampath1117 <[email protected]>
Co-authored-by: HazarathKumarM <[email protected]>
Co-authored-by: Kiriti Gowda <[email protected]>
Co-authored-by: Srihari-mcw <[email protected]>
* Add Intial u8 implementation for Rain

* Add I8 implementation and Changes based on the Review comments

* Initial HIP implementation
Add F32 and F16 Tensor Implementation

* Add test case for Rain in HIP test suite
code cleanup

* minor code cleanup

* Modified func names and removed unnecessary code

* Resolve Review comments

* replaced pinned memory with HIP memory for Rain Layer computation

* Modified RGB Rain Mask to planar Rain Mask in HIP

* Address review comments

* Add Rain compute function

* Add version changes and Resolve review comments

* fix build warnings

* Fix the outputs of f16 toggle variants

* Revert Rain width changes

* Fix pln3 outputs for u8 and i8 bitdepths

* Resolve review comments

* Modified load and store routines for planar cases

* Resolve review comments

* Modify docs image

* Fix versioning

* Updates to 1.9.10 including rain feature

---------

Co-authored-by: HazarathKumarM <[email protected]>
Co-authored-by: Kiriti Gowda <[email protected]>
Co-authored-by: Srihari-mcw <[email protected]>
* Lock nifti_clib commit in readme

* Lock nifti_clib commit in common.groovy

* Change to sudo apt install half in common.groovy
* experimental changes to detect error and print in the  end in image test suite

* Error handling added for host side

* Error detection implemented on HIP SIDE

* Voxel test suite changes

* Changed variable name to camelCase

* Changes in srcpath

* Changes in Voxel test suite for nonQA case

* Consolidated the repeated code and move it as common code

* Minor changes based on review commands

* Modification for bitDepth in voxel host

* Merge with develop branch

* Fix on error code display and gaussian Filter

* F string bug is resolved

* Fix for CI failure and some improvement in error detection

* Changes based on review comments

* Fix for rain and warp_perspective issue of unable to open file

* Enhanced display for non implimented functionality

---------

Co-authored-by: sampath1117 <[email protected]>
Co-authored-by: dineshbabu-ravichandran <[email protected]>
Co-authored-by: dineshbabu-ravichandran <[email protected]>
Co-authored-by: Kiriti Gowda <[email protected]>
Co-authored-by: HazarathKumarM <[email protected]>
…ility (#499)

* initial commit

* removed the usage of supported case list on HOST backend

* Add Augmentation enum

* removed supported caselists from all the python scripts in HIP backend

* replacing case numbers with the enum's on the test suite files

* Fix Indentation

* Add enums for the swith cases

* update Enum's for new cases

* Fix errors in unit tests

* Semicolon typo fix

* Fix the test case naming in QA mode

* removes unncessary print statements

---------

Co-authored-by: HazarathKumarM <[email protected]>
Co-authored-by: Kiriti Gowda <[email protected]>
…ocs/sphinx (#511)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.13.0 to 1.14.1.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.13.0...v1.14.1)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  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>
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.

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

utilities/test_suite/common.py:95

  • The new augmentation entry for JPEG compression distortion only includes two items, whereas the other entries have three (e.g., "tensor_max" has "HOST" and "HIP"). Please confirm if a missing execution environment (likely "HOST") should be added for consistency.
93: ["jpeg_compression_distortion","HIP"],

@r-abishek r-abishek requested a review from a team as a code owner April 9, 2025 03:52
Co-authored-by: Copilot <[email protected]>
Copy link
Contributor

@spolifroni-amd spolifroni-amd left a comment

Choose a reason for hiding this comment

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

Changelog looks good. Let me know if this page needs to be updated at all:

https://rocm.docs.amd.com/projects/rpp/en/develop/reference/rpp-supported-functionalities.html

@kiritigowda kiritigowda requested a review from Copilot April 10, 2025 22:48
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.

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

utilities/test_suite/common.py:95

  • The augmentation mapping for 'jpeg_compression_distortion' lists only the 'HIP' backend, whereas similar entries include both 'HOST' and 'HIP'. If this augmentation is intentionally HIP-only, consider adding a comment to clarify this design choice.
93: ["jpeg_compression_distortion","HIP"],

@kiritigowda kiritigowda self-assigned this Apr 11, 2025
@kiritigowda kiritigowda added the enhancement New feature or request label Apr 11, 2025
@kiritigowda
Copy link
Collaborator

@r-abishek - please resolve conflicts

@kiritigowda kiritigowda merged commit 7058dac into ROCm:develop Apr 30, 2025
20 checks passed
@codecov
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

❌ Patch coverage is 99.37500% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../tensor/hip/kernel/jpeg_compression_distortion.cpp 99.14% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #538      +/-   ##
===========================================
+ Coverage    54.72%   54.79%   +0.07%     
===========================================
  Files          292      293       +1     
  Lines       118294   118454     +160     
===========================================
+ Hits         64736    64903     +167     
+ Misses       53558    53551       -7     
Files with missing lines Coverage Δ
src/include/common/hip/rpp_hip_load_store.hpp 26.53% <ø> (ø)
...les/tensor/rppt_tensor_geometric_augmentations.cpp 91.58% <100.00%> (+0.16%) ⬆️
.../tensor/hip/kernel/jpeg_compression_distortion.cpp 99.14% <99.14%> (ø)

... and 1 file with indirect coverage changes

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:precheckin enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants