Adds HIP kernel for yuv to rgb#691
Merged
LakshmiKumar23 merged 13 commits intoROCm:developfrom Mar 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds NV12 (YUV) → packed RGB24 conversion support for the HIP backend in the tensor “data exchange operations” module, and extends the HIP test suite with a new test case and QA assets.
Changes:
- Introduces
rppt_yuv_to_rgb()public API and HIP implementation for NV12 8-bit YUV → RGB24. - Extends HIP test executable + Python harness to run a new test case (103) with the correct layout/bit-depth constraints.
- Adds YUV test inputs with
.infosidecars and corresponding per-image packed.rgbreference outputs; updates QA comparison path accordingly.
Reviewed changes
Copilot reviewed 13 out of 17 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 | Adds YUV sidecar parsing, NV12 batch reader, YUV-specific ROI/max-dim helpers, and per-image QA compare path for .rgb references. |
| utilities/test_suite/common.py | Registers new test case (103) and adds yuv_to_rgb under data exchange operations. |
| utilities/test_suite/TEST_IMAGES/three_images_yuv/mug_420_3840x2160_nv12.info | Adds sidecar metadata (width/height) for NV12 input. |
| utilities/test_suite/TEST_IMAGES/three_images_yuv/driving_frame_2048x1024.info | Adds sidecar metadata (width/height + color_range) for NV12 input. |
| utilities/test_suite/TEST_IMAGES/three_images_yuv/1_img150x150.yuv | Adds a YUV NV12 test input (binary). |
| utilities/test_suite/TEST_IMAGES/three_images_yuv/1_img150x150.info | Adds sidecar metadata for the 150×150 NV12 input. |
| utilities/test_suite/REFERENCE_OUTPUT/yuv_to_rgb/1_img150x150.rgb | Adds packed RGB24 golden output (binary). |
| utilities/test_suite/HIP/runImageTests.py | Adds yuv-specific input path routing and restricts yuv_to_rgb to PKD3 + U8-only variants (unit/perf/profile). |
| utilities/test_suite/HIP/Tensor_image_hip.cpp | Adds YUV_TO_RGB case handling: file discovery for .yuv, sidecar-driven dims/ROI, NV12 reading, and per-image rppt_yuv_to_rgb() invocation. |
| src/modules/tensor/rppt_tensor_data_exchange_operations.cpp | Implements rppt_yuv_to_rgb() dispatch for HIP backend. |
| src/modules/tensor/hip/kernel/color_space_conversion.cpp | Adds the HIP kernel and executor implementation for NV12 → RGB24. |
| src/include/tensor/hip_tensor_executors.hpp | Declares hip_exec_yuv_to_rgb() template executor. |
| api/rppt_tensor_data_exchange_operations.h | Exposes the rppt_yuv_to_rgb() API and documents parameters/constraints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #691 +/- ##
===========================================
- Coverage 91.97% 91.93% -0.04%
===========================================
Files 204 205 +1
Lines 92299 92386 +87
===========================================
+ Hits 84884 84927 +43
- Misses 7415 7459 +44
🚀 New features to boost your workflow:
|
Member
AryanSalmanpour
left a comment
There was a problem hiding this comment.
please add set (HIP_PLATFORM amd CACHE STRING "HIP platform") before line 127 for running the test with TheRock
https://github.com/ROCm/rpp/blob/develop/utilities/test_suite/HIP/CMakeLists.txt#L127
AryanSalmanpour
approved these changes
Mar 26, 2026
Contributor
Author
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.
Motivation
Adds HIP kernel for YUV (NV12 format) to RGB (Packed 24bit format)
Technical Details
Adds HIP implementation for 8-bit NV12 input, adopted from rocdecode and throws
NOT_IMPLEMENTEDfor HOST backend.Adds 3 test
.yuvimages, a.infofile for their meta-data and output.rgbfiles.Adds QA and non QA mode for test suite. Compares one image input to corresponding output (not batched tensor output)
Test Plan
Test case
103 - YUV_TO_RGBhas been added.test command:
Test Result
Submission Checklist