RPP Channel Permute : Modified swap channels as Channel Permute#428
Merged
r-abishek merged 2 commits intor-abishek:ar/opt_swap_channelsfrom Apr 29, 2025
Conversation
Collaborator
HazarathKumarM
commented
Apr 28, 2025
- Renamed swap channels as channel permute
- changed the permuatation tensor computation
r-abishek
requested changes
Apr 29, 2025
Owner
r-abishek
left a comment
There was a problem hiding this comment.
@HazarathKumarM Please address comments
| /*! \brief Swap channels operation on HOST backend for a NCHW/NHWC layout tensor | ||
| * \details The swap channels operation swaps R and B channels to toggle RGB<->BGR for a batch of RGB(3 channel) images with an NHWC/NCHW tensor layout.<br> | ||
| /*! \brief Channel permute operation on HOST backend for a NCHW/NHWC layout tensor | ||
| * \details \details The channel permute operation runs 6 channel swap permutations (R-G-B, R-B-G, G-R-B, G-B-R, B-R-G, B-G-R) by varying permuatationIndex (0 to 5) |
| * \param [out] dstPtr destination tensor in HIP memory | ||
| * \param [in] dstDescPtr destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr) | ||
| * \param [in] permTensor permutation tensor for swap operation in pinned / HIP memory | ||
| * \param [in] permutationIndexes permutation indexes for the channels permute operation in pinned/HIP memory. (0 <= permutationIndexes[n] <= 5), which specifies the swap order for the kernel. |
Owner
There was a problem hiding this comment.
From a user perspective, permutationIndexes is not quite intuitive - it indicates an index to an array. Instead:
Call it:
* \param [in] permutationsList An array of Rpp32u elements of size batchSize (srcDescPtr->n) containing a type of permutation order (0-5) for each image in the batch in pinned/HIP memory. (0 <= permutationsList[n] <= 5), which specifies the permutation order for the output of each image in the batch.
r-abishek
approved these changes
Apr 29, 2025
ManasaDattaT
pushed a commit
to ManasaDattaT/rpp
that referenced
this pull request
Dec 19, 2025
* Test Suite - updates * Changelog - Updates * Readme - Fix * CMakeList - cleanup * Version - update * Version - Add note * Readme - updates * Readme - Updates * Readme - Fix add ldconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.