Channel Permute - Addition of 'permutationsList' argument#547
Channel Permute - Addition of 'permutationsList' argument#547rrawther merged 29 commits intoROCm:developfrom
Conversation
…Permute RPP Tensor Support - Swap channels on HOST and HIP
There was a problem hiding this comment.
Pull Request Overview
This PR extends the swap_channels augmentation to support all possible RGB channel permutations by introducing a new "permTensor" argument, which is propagated through both the HOST and HIP backends and reflected in the associated tests.
- Added the new "permTensor" argument to swap_channels functions and updated kernels in both host and HIP code.
- Updated unit and performance test scripts on HOST and HIP to loop over all six channel permutation orders.
- Modified interface declarations and API documentation to include the new parameter.
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| utilities/test_suite/rpp_test_suite_image.h | Added SWAP_CHANNELS to additionalParamCases and branch for perm order string generation; introduced fill_perm_values for permutation setup. |
| utilities/test_suite/HOST/runImageTests.py | Added new test branch (case "85") to iterate over all swap orders for host tests. |
| utilities/test_suite/HOST/Tensor_image_host.cpp | Updated swap_channels calls to pass the permTensor and adjusted function naming accordingly. |
| utilities/test_suite/HIP/runImageTests.py | Added new test branch (case "85") to iterate over swap orders for HIP tests. |
| utilities/test_suite/HIP/Tensor_image_hip.cpp | Allocates and frees permTensor, and updates swap_channels GPU calls to include permTensor. |
| src/modules/tensor/rppt_tensor_data_exchange_operations.cpp | Updated swap_channels function signatures to include the new permTensor parameter. |
| src/modules/tensor/hip/kernel/swap_channels.cpp | Updated device kernel functions to pass permTensor to the swap_channels_hip_compute routine. |
| src/include/tensor/host_tensor_executors.hpp and src/include/tensor/hip_tensor_executors.hpp | Updated function declarations to include permTensor. |
| api/rppt_tensor_data_exchange_operations.h | Updated API documentation and function prototypes to include the new permTensor parameter. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #547 +/- ##
===========================================
+ Coverage 54.81% 54.84% +0.03%
===========================================
Files 293 293
Lines 118454 118516 +62
===========================================
+ Hits 64921 64994 +73
+ Misses 53533 53522 -11
🚀 New features to boost your workflow:
|
spolifroni-amd
left a comment
There was a problem hiding this comment.
The changelog line needs some context.
…Permute RPP Channel Permute : Modified swap channels as Channel Permute
There was a problem hiding this comment.
Pull Request Overview
This PR renames the existing swap_channels augmentation to channel_permute and adds a new permTensor argument to allow any permutation of the RGB channels. Key changes include updating API functions for both HOST and HIP backends, modifying test suite cases and scripts, and updating related documentation and changelog entries.
Reviewed Changes
Copilot reviewed 26 out of 26 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 | Renamed augmentation key from "swap_channels" to "channel_permute" |
| utilities/test_suite/common.py | Updated augmentation name to channel_permute in test mapping |
| utilities/test_suite/HOST/runImageTests.py | Modified test invocation to iterate over 6 permutation orders |
| utilities/test_suite/HOST/Tensor_image_host.cpp | Updated function name and handling for channel_permute augmentation |
| utilities/test_suite/HIP/runImageTests.py | Updated test invocation for HIP backend using new channel_permute logic |
| utilities/test_suite/HIP/Tensor_image_hip.cpp | Updated function name, parameter handling and memory management for channel_permute augmentation |
| src/modules/tensor/rppt_tensor_data_exchange_operations.cpp | Renamed API functions and added the new permTensor parameter in host and GPU implementations |
| src/include/tensor/host_tensor_executors.hpp and hip_tensor_executors.hpp | Updated declarations and documentation to reflect channel_permute changes |
| api/rppt_tensor_data_exchange_operations.h | Updated API comments and function signature to include the new permTensor parameter |
| CHANGELOG.md | Documented change to the API of the swap_channels augmentation |
Comments suppressed due to low confidence (1)
utilities/test_suite/HOST/runImageTests.py:88
- [nitpick] Consider renaming the local variable 'swapOrder' to 'permOrder' in the test scripts for clarity and to better reflect the updated channel_permute functionality.
for swapOrder in range(swapOrderRange):
rrawther
left a comment
There was a problem hiding this comment.
Added comments. Main idea is get rid of permutelist and take the permute channel order directly so the API will be more transparent to the user
…Permute Random Channel Permute : Resolved review comments
The PR adds one argument to already existent swap_channels augmentation.
The new "permutationTensor" argument takes in any permutation to permute the RGB channels in any order.
Name of the function has been changed to channel_permute since swap_channels indicated only two channels being swapped.