Skip to content

Hue and Saturation adjustment augmentations on HOST and HIP #573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jul 24, 2025

Conversation

r-abishek
Copy link
Member

  • Add Hue and Saturation adjustment augmentations on HOST and HIP for U8/F16/F32/I8 with NCHW/NHWC layout toggle variants
  • Modify color_twist to use low level helper functions rgb_to_hsv() and hsv_to_rgb()
  • Add relevant unit/QA/perf tests

@r-abishek r-abishek requested a review from Copilot June 25, 2025 01:27
@r-abishek r-abishek added enhancement New feature or request ci:precheckin labels Jun 25, 2025
Copy link
Contributor

@Copilot 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

Adds support for hue and saturation adjustments across HOST and HIP backends, refactors color_twist to use dedicated RGB↔HSV helpers, and integrates new augmentations into the test suite.

  • Extend augmentation mappings and enums for hue (42) and saturation (43)
  • Implement host and GPU entry points and kernels for hue and saturation
  • Refactor color_twist kernels to leverage rgb_to_hsv/hsv_to_rgb helpers

Reviewed Changes

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

Show a summary per file
File Description
utilities/test_suite/rpp_test_suite_image.h Register HUE and SATURATION in the augmentation enum and map
utilities/test_suite/common.py Add hue/saturation entries to test parameters (typo notice)
utilities/test_suite/HOST/Tensor_image_host.cpp Add HOST test cases for HUE and SATURATION
utilities/test_suite/HIP/Tensor_image_hip.cpp Add HIP test cases and memory handling for HUE and SATURATION
src/modules/tensor/rppt_tensor_color_augmentations.cpp Add rppt_hue_* and rppt_saturation_* host/gpu entry points
src/modules/tensor/hip/kernel/hue.cpp Implement HIP kernels for hue adjustment
src/modules/tensor/hip/kernel/saturation.cpp Implement HIP kernels for saturation adjustment
src/modules/tensor/hip/kernel/color_twist.cpp Refactor color_twist to use rgb_to_hsv/hsv_to_rgb
Comments suppressed due to low confidence (1)

utilities/test_suite/common.py:132

  • Ensure that unit or QA tests explicitly cover the newly added hue (42) and saturation (43) augmentations so their registration and behavior are validated.
    "color_augmentations" : [0, 1, 2, 3, 4, 13, 31, 34, 36, 42, 43, 45, 81],

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

codecov bot commented Jun 25, 2025

Codecov Report

Attention: Patch coverage is 99.91205% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/modules/tensor/hip/kernel/hue.cpp 98.51% 1 Missing ⚠️
src/modules/tensor/hip/kernel/saturation.cpp 98.51% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #573      +/-   ##
===========================================
+ Coverage    87.54%   88.02%   +0.48%     
===========================================
  Files          185      190       +5     
  Lines        78708    80802    +2094     
===========================================
+ Hits         68898    71120    +2222     
+ Misses        9810     9682     -128     
Files with missing lines Coverage Δ
.../include/common/cpu/rpp_cpu_rgb_hsv_conversion.hpp 100.00% <100.00%> (ø)
src/modules/tensor/cpu/kernel/color_twist.cpp 100.00% <100.00%> (+6.58%) ⬆️
src/modules/tensor/cpu/kernel/hue.cpp 100.00% <100.00%> (ø)
src/modules/tensor/cpu/kernel/saturation.cpp 100.00% <100.00%> (ø)
src/modules/tensor/hip/kernel/color_twist.cpp 98.77% <ø> (ø)
...modules/tensor/rppt_tensor_color_augmentations.cpp 98.64% <100.00%> (+2.31%) ⬆️
src/modules/tensor/hip/kernel/hue.cpp 98.51% <98.51%> (ø)
src/modules/tensor/hip/kernel/saturation.cpp 98.51% <98.51%> (ø)

... and 5 files with indirect coverage changes

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

@kiritigowda kiritigowda requested a review from rrawther June 27, 2025 05:45
@kiritigowda kiritigowda self-assigned this Jun 27, 2025
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 review comments

@kiritigowda kiritigowda merged commit 4da7776 into ROCm:develop Jul 24, 2025
22 checks passed
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.

4 participants