Skip to content

Emboss Augmentation on HOST and HIP#675

Merged
LakshmiKumar23 merged 65 commits intoROCm:developfrom
r-abishek:ar/emboss
Mar 17, 2026
Merged

Emboss Augmentation on HOST and HIP#675
LakshmiKumar23 merged 65 commits intoROCm:developfrom
r-abishek:ar/emboss

Conversation

@r-abishek
Copy link
Copy Markdown
Member

  • Adds Emboss Augmentation on HOST and HIP.
  • Emboss applies a convolution operator to a 2D image array to generate an array containing difference values that represent edges in the original image.
  • Support for kernel sizes 3, 5, 7, and 9 fo bit depths U8/F16/F32/I8
  • Adds relevant unit/perf tests and qa test support.

RooseweltMcW and others added 30 commits May 6, 2025 22:07
Copy link
Copy Markdown
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.

Pull request overview

Adds a new Emboss filter augmentation to the RPP tensor API, with HOST/HIP execution support and test-suite / QA wiring so the new op can be exercised via the existing test runners.

Changes:

  • Adds rppt_emboss(...) to the public tensor filter augmentations API and dispatches it in rppt_tensor_filter_augmentations.cpp for HOST and HIP backends.
  • Implements the HOST emboss kernel (CPU) and declares HOST/HIP executor entrypoints.
  • Extends the Python/C++ test suite mappings and runners to include the new emboss case (ID 101) and kernel-size sweep (3/5/7/9), and adds doxygen output images for emboss.

Reviewed changes

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

Show a summary per file
File Description
utilities/test_suite/rpp_test_suite_image.h Registers emboss in augmentation maps/enums and treats it as a kernel-size case.
utilities/test_suite/common.py Adds emboss to Python augmentation map and filter augmentation group.
utilities/test_suite/HOST/runImageTests.py Runs emboss across kernel sizes as part of HOST test matrix.
utilities/test_suite/HOST/Tensor_image_host.cpp Adds emboss case execution path in the HOST C++ test binary and updates printed case range.
utilities/test_suite/HIP/runImageTests.py Runs emboss across kernel sizes as part of HIP test/perf matrix.
utilities/test_suite/HIP/Tensor_image_hip.cpp Adds emboss case execution path and alloc/free of strength/bias tensors in HIP test binary.
src/modules/tensor/rppt_tensor_filter_augmentations.cpp Adds rppt_emboss entrypoint and backend dispatch (HOST/HIP).
src/modules/tensor/cpu/kernel/emboss.cpp Adds the HOST emboss implementation (kernel creation + optimized paths).
src/include/tensor/host_tensor_executors.hpp Declares emboss_host_tensor / emboss_generic_host_tensor.
src/include/tensor/hip_tensor_executors.hpp Declares hip_exec_emboss_tensor.
docs/data/doxygenOutputs/filter_augmentations_emboss_kSize3_img150x150.png Adds doxygen sample output image for emboss (3x3).
docs/data/doxygenOutputs/filter_augmentations_emboss_kSize5_img150x150.png Adds doxygen sample output image for emboss (5x5).
docs/data/doxygenOutputs/filter_augmentations_emboss_kSize7_img150x150.png Adds doxygen sample output image for emboss (7x7).
docs/data/doxygenOutputs/filter_augmentations_emboss_kSize9_img150x150.png Adds doxygen sample output image for emboss (9x9).
api/rppt_tensor_filter_augmentations.h Documents and exposes the new rppt_emboss public API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1218 to +1220
__m256 pRow[45], pDst[2];
rpp_load_gaussian_filter_9x9_pkd_pln_host(pRow, srcPtrTemp, rowKernelLoopLimit, padIndex);
pDst[0] = avx_p0;
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

In the 9x9 NHWC->NCHW AVX2 path, this calls rpp_load_gaussian_filter_9x9_pkd_pln_host(...), which looks like a copy/paste from gaussian_filter and is inconsistent with emboss. This likely loads the wrong neighborhood/packing assumptions for emboss and can corrupt output. Please switch to the appropriate generic NxN loader used elsewhere in emboss (or add an emboss-specific 9x9 pkd->pln loader).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@HazarathKumarM HazarathKumarM Mar 17, 2026

Choose a reason for hiding this comment

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

Both emboss and gaussian filter are algorithmically similar expect the filter values. So same loads and store funcs of gaussian filter are used here

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 86.90196% with 167 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/modules/tensor/cpu/kernel/emboss.cpp 86.14% 159 Missing ⚠️
...odules/tensor/rppt_tensor_filter_augmentations.cpp 93.75% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #675      +/-   ##
===========================================
- Coverage    92.46%   92.43%   -0.02%     
===========================================
  Files          198      200       +2     
  Lines        89139    90759    +1620     
===========================================
+ Hits         82415    83891    +1476     
- Misses        6724     6868     +144     
Files with missing lines Coverage Δ
src/modules/tensor/hip/kernel/emboss.cpp 99.71% <ø> (ø)
...odules/tensor/rppt_tensor_filter_augmentations.cpp 93.10% <93.75%> (+0.16%) ⬆️
src/modules/tensor/cpu/kernel/emboss.cpp 86.14% <86.14%> (ø)

... and 3 files with indirect coverage changes

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

@rrawther rrawther self-requested a review March 16, 2026 18:26
Copy link
Copy Markdown
Contributor

@LakshmiKumar23 LakshmiKumar23 left a comment

Choose a reason for hiding this comment

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

@LakshmiKumar23 LakshmiKumar23 merged commit af8e88e into ROCm:develop Mar 17, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants