Skip to content

[rocRAND] Add missing include for utility header (cherry-pick) - #666

Merged
vamovsik merged 1 commit into
ROCm:release/rocm-rel-7.0from
umfranzw:add_utility_header_cherry-pick
Jul 21, 2025
Merged

vamovsik merged 1 commit into
ROCm:release/rocm-rel-7.0from
umfranzw:add_utility_header_cherry-pick

Conversation

@umfranzw

Copy link
Copy Markdown
Contributor

rocrand/library/include/rocrand/rocrand_common.h was missing an include for the utility header. This header is needed for std::declval.

rocrand/library/include/rocrand/rocrand_common.h
was missing an include for the utility header.
This header is needed for std::declval.
@vamovsik
vamovsik merged commit 922a2e3 into ROCm:release/rocm-rel-7.0 Jul 21, 2025
assistant-librarian Bot pushed a commit to ROCm/rocRAND that referenced this pull request Jul 21, 2025
[rocRAND] Add missing include for utility header
 (cherry-pick) (#666)

rocrand/library/include/rocrand/rocrand_common.h was missing an include
for the utility header. This header is needed for `std::declval`.
ammallya pushed a commit that referenced this pull request Jun 8, 2026
* added initial api support for erode

* added support for U8 and I8 bitdepths for 3, 5, 7, 9 kernel sizes

* added F16 and F32 bitdepth support

* added generic kernel support

* added golden outputs

removed commented code

* fix build errors

* Fix build and test_suite errors

* revert padding changes

* updated erode HIP kernel with latest changes

* Add F32 QA

* minor formatting fixes

* minor comment fix

* resolve copilot comments

* resolve review comments

* resolved review comments

* Add unpack templating changes and fix segmentation issue

* Fix PKD to PKD kernel 9  for Pack and Unpack changes.

* Add and template signext function

* Fix min Comments

* Fix one min Comments

* Add unroll and rename of preLoadRows

* Fix remane of Loader and MorphVecLoader

* Add empty line before comment

* Fix remove empty line, rename of kernelSze & padPolicy and remove {} for single line condition

* resolved review comments

* fix build warnings

---------

Co-authored-by: sampath1117 <sampath.rachumallu@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Mukesh Jayakodi <mukesh.jayakodi@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: HazarathKumarM <119284987+HazarathKumarM@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
ammallya pushed a commit that referenced this pull request Jun 8, 2026
* add support for dilate in HOST backend

* minor fix in changelog

* added golden outputs

remove commented code

* resolve build errors

* Add padding changes in HIP backend

* fix sigsev issues

* fix QA for 9x9 kernel

* Add if condition for pack function and template for unpack and signext function

* Fix the rename of preLoadRows and max  Comments

* Fix Fix remane of Loader and MorphVecLoader

* Fix empty space, dilate_row_hip_compute function, removed if & else and aligned indent R.

* Fix remove whitespace and restored all unnecessary changes.

* Fix remove precision line and reverted back to static cast.

* Fix remove empty line, rename of kernelSze & padPolicy and remove {} for single line condition

* Fix Indentation of IF condition.

* resolved review comments

* resolve review comments

* Test suite - Add QA pass/fail tests for F32 bit depth (#665)

* Travis CI - key error fix

* Fix Bug in ColorTwist (#6) (#8) (#9)

* Added golden outputs and resolved HOST backend

* Updated bin files for median filter and resize crop mirror

* Updated bin files

* Updated bin files for the next set of kernel F32 QA

* Updated bin files for jpeg_compression_distortion

* Fixed resize QA failures

* Fix for Resize bilinear F32 QA HOST and HIP

* Fix for lens correction QA f32 for HOST and HIP for 1e-4 precision

* Fixed HIP rcm QA

* updates for warp Affine F32 QA

* Fix for RCM QA match for U8 and F32 updates AVX

* Fix for lens correction AVX

* Removed space

* Fixed warp affine for every other varient with the updated changes

* Add fixes to match precision in quantization

* Fix Precision mismatches

* Update default cutoff to 1e-5 and specialized cutoff to 1e-4

* F32 QA Fix

* Made Quality percentage as arg from testsuite

* Resolved copilot comments

* Resolved the copilot comments

* Resolved Codex comments

* HOST and HIP - pinned buffers for respective API (#628)

* Removed memcpy and used hipHostMalloc for allocation : blend

* Removed memcpy and used hipHostMalloc for allocation : brightness

* Removed memcpy and used hipHostMalloc for allocation : color cast

* Removed memcpy and used hipHostMalloc for allocation : color twist

* Removed memcpy and used hipHostMalloc for allocation : contrast

* Removed memcpy and used hipHostMalloc for allocation : crop mirror normalize

* Removed memcpy and used hipHostMalloc for allocation : Exposure

* Removed memcpy and used hipHostMalloc for allocation : Gamma correction

* Removed memcpy and used hipHostMalloc for allocation : gaussian filter

* Removed memcpy and used hipHostMalloc for allocation : Noise

* Removed memcpy and used hipHostMalloc for allocation : Non linear blend

* Removed memcpy and used hipHostMalloc for allocation : Resize mirror normalize

* Removed memcpy and used hipHostMalloc for allocation : Water

* Added hipHostFree for all kernels in test suite

* Added hipHostFree for all kernels in test suite

* Removed memcpy and used hipHostMalloc for allocation : Flip, spatter, rcm, color temperature

* Resolved copilot review comments

* Updated version

* Removed unused parameter

* Updated version in cmakeList

* removed the host to device mem copies for warp affine and rotate

* Updated version

* Removed comment

* Updated Chnagelog file

* Update patch version from 2.2.0 to 2.2.1

* Update CHANGELOG

* Address copilot comments for HIP HOST consistent allocation

* Documentation changes for updated memcpy changes

* Update ricap outer API to use pinned memory and remove mem copy

* Fix memory allocation and deallocation for permutationTensor

* Update api/rppt_tensor_effects_augmentations.h

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

* Fix spelling of noiseProbability and saltProbability

* Fix deallocation

---------

Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* resolved review comments

* minor comment change

* Resolved copilot review comments

* Update src/modules/tensor/cpu/kernel/resize.cpp

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

* Update src/modules/tensor/cpu/kernel/resize.cpp

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

* Update src/modules/tensor/hip/kernel/jpeg_compression_distortion.cpp

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

* Updated test suite and resoled review comments

* Updated HIP for F32 QA reduction function cases

---------

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Lokesh Bonta <lokeswara@multicorewareinc.com>
Co-authored-by: sampath117 <snehaa@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: ManasaDattaT <tammisetti.manasadatta@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

* Erode - HOST and HIP update (#666)

* added initial api support for erode

* added support for U8 and I8 bitdepths for 3, 5, 7, 9 kernel sizes

* added F16 and F32 bitdepth support

* added generic kernel support

* added golden outputs

removed commented code

* fix build errors

* Fix build and test_suite errors

* revert padding changes

* updated erode HIP kernel with latest changes

* Add F32 QA

* minor formatting fixes

* minor comment fix

* resolve copilot comments

* resolve review comments

* resolved review comments

* Add unpack templating changes and fix segmentation issue

* Fix PKD to PKD kernel 9  for Pack and Unpack changes.

* Add and template signext function

* Fix min Comments

* Fix one min Comments

* Add unroll and rename of preLoadRows

* Fix remane of Loader and MorphVecLoader

* Add empty line before comment

* Fix remove empty line, rename of kernelSze & padPolicy and remove {} for single line condition

* resolved review comments

* fix build warnings

---------

Co-authored-by: sampath1117 <sampath.rachumallu@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Mukesh Jayakodi <mukesh.jayakodi@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: HazarathKumarM <119284987+HazarathKumarM@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

* fix build errors

---------

Co-authored-by: sampath1117 <sampath.rachumallu@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Mukesh Jayakodi <mukesh.jayakodi@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: HazarathKumarM <119284987+HazarathKumarM@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Lokesh Bonta <lokeswara@multicorewareinc.com>
Co-authored-by: sampath117 <snehaa@multicorewareinc.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: ManasaDattaT <tammisetti.manasadatta@multicorewareinc.com>
Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
kliegeois pushed a commit to kliegeois/rocm-libraries that referenced this pull request Jun 8, 2026
* added initial api support for erode

* added support for U8 and I8 bitdepths for 3, 5, 7, 9 kernel sizes

* added F16 and F32 bitdepth support

* added generic kernel support

* added golden outputs

removed commented code

* fix build errors

* Fix build and test_suite errors

* revert padding changes

* updated erode HIP kernel with latest changes

* Add F32 QA

* minor formatting fixes

* minor comment fix

* resolve copilot comments

* resolve review comments

* resolved review comments

* Add unpack templating changes and fix segmentation issue

* Fix PKD to PKD kernel 9  for Pack and Unpack changes.

* Add and template signext function

* Fix min Comments

* Fix one min Comments

* Add unroll and rename of preLoadRows

* Fix remane of Loader and MorphVecLoader

* Add empty line before comment

* Fix remove empty line, rename of kernelSze & padPolicy and remove {} for single line condition

* resolved review comments

* fix build warnings

---------

Co-authored-by: sampath1117 <sampath.rachumallu@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Mukesh Jayakodi <mukesh.jayakodi@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: HazarathKumarM <119284987+HazarathKumarM@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

[ROCm/rpp commit: 1101e7f]
kliegeois pushed a commit to kliegeois/rocm-libraries that referenced this pull request Jun 8, 2026
* add support for dilate in HOST backend

* minor fix in changelog

* added golden outputs

remove commented code

* resolve build errors

* Add padding changes in HIP backend

* fix sigsev issues

* fix QA for 9x9 kernel

* Add if condition for pack function and template for unpack and signext function

* Fix the rename of preLoadRows and max  Comments

* Fix Fix remane of Loader and MorphVecLoader

* Fix empty space, dilate_row_hip_compute function, removed if & else and aligned indent R.

* Fix remove whitespace and restored all unnecessary changes.

* Fix remove precision line and reverted back to static cast.

* Fix remove empty line, rename of kernelSze & padPolicy and remove {} for single line condition

* Fix Indentation of IF condition.

* resolved review comments

* resolve review comments

* Test suite - Add QA pass/fail tests for F32 bit depth (ROCm#665)

* Travis CI - key error fix

* Fix Bug in ColorTwist (ROCm#6) (ROCm#8) (ROCm#9)

* Added golden outputs and resolved HOST backend

* Updated bin files for median filter and resize crop mirror

* Updated bin files

* Updated bin files for the next set of kernel F32 QA

* Updated bin files for jpeg_compression_distortion

* Fixed resize QA failures

* Fix for Resize bilinear F32 QA HOST and HIP

* Fix for lens correction QA f32 for HOST and HIP for 1e-4 precision

* Fixed HIP rcm QA

* updates for warp Affine F32 QA

* Fix for RCM QA match for U8 and F32 updates AVX

* Fix for lens correction AVX

* Removed space

* Fixed warp affine for every other varient with the updated changes

* Add fixes to match precision in quantization

* Fix Precision mismatches

* Update default cutoff to 1e-5 and specialized cutoff to 1e-4

* F32 QA Fix

* Made Quality percentage as arg from testsuite

* Resolved copilot comments

* Resolved the copilot comments

* Resolved Codex comments

* HOST and HIP - pinned buffers for respective API (ROCm#628)

* Removed memcpy and used hipHostMalloc for allocation : blend

* Removed memcpy and used hipHostMalloc for allocation : brightness

* Removed memcpy and used hipHostMalloc for allocation : color cast

* Removed memcpy and used hipHostMalloc for allocation : color twist

* Removed memcpy and used hipHostMalloc for allocation : contrast

* Removed memcpy and used hipHostMalloc for allocation : crop mirror normalize

* Removed memcpy and used hipHostMalloc for allocation : Exposure

* Removed memcpy and used hipHostMalloc for allocation : Gamma correction

* Removed memcpy and used hipHostMalloc for allocation : gaussian filter

* Removed memcpy and used hipHostMalloc for allocation : Noise

* Removed memcpy and used hipHostMalloc for allocation : Non linear blend

* Removed memcpy and used hipHostMalloc for allocation : Resize mirror normalize

* Removed memcpy and used hipHostMalloc for allocation : Water

* Added hipHostFree for all kernels in test suite

* Added hipHostFree for all kernels in test suite

* Removed memcpy and used hipHostMalloc for allocation : Flip, spatter, rcm, color temperature

* Resolved copilot review comments

* Updated version

* Removed unused parameter

* Updated version in cmakeList

* removed the host to device mem copies for warp affine and rotate

* Updated version

* Removed comment

* Updated Chnagelog file

* Update patch version from 2.2.0 to 2.2.1

* Update CHANGELOG

* Address copilot comments for HIP HOST consistent allocation

* Documentation changes for updated memcpy changes

* Update ricap outer API to use pinned memory and remove mem copy

* Fix memory allocation and deallocation for permutationTensor

* Update api/rppt_tensor_effects_augmentations.h

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

* Fix spelling of noiseProbability and saltProbability

* Fix deallocation

---------

Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* resolved review comments

* minor comment change

* Resolved copilot review comments

* Update src/modules/tensor/cpu/kernel/resize.cpp

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

* Update src/modules/tensor/cpu/kernel/resize.cpp

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

* Update src/modules/tensor/hip/kernel/jpeg_compression_distortion.cpp

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

* Updated test suite and resoled review comments

* Updated HIP for F32 QA reduction function cases

---------

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Lokesh Bonta <lokeswara@multicorewareinc.com>
Co-authored-by: sampath117 <snehaa@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: ManasaDattaT <tammisetti.manasadatta@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

* Erode - HOST and HIP update (ROCm#666)

* added initial api support for erode

* added support for U8 and I8 bitdepths for 3, 5, 7, 9 kernel sizes

* added F16 and F32 bitdepth support

* added generic kernel support

* added golden outputs

removed commented code

* fix build errors

* Fix build and test_suite errors

* revert padding changes

* updated erode HIP kernel with latest changes

* Add F32 QA

* minor formatting fixes

* minor comment fix

* resolve copilot comments

* resolve review comments

* resolved review comments

* Add unpack templating changes and fix segmentation issue

* Fix PKD to PKD kernel 9  for Pack and Unpack changes.

* Add and template signext function

* Fix min Comments

* Fix one min Comments

* Add unroll and rename of preLoadRows

* Fix remane of Loader and MorphVecLoader

* Add empty line before comment

* Fix remove empty line, rename of kernelSze & padPolicy and remove {} for single line condition

* resolved review comments

* fix build warnings

---------

Co-authored-by: sampath1117 <sampath.rachumallu@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Mukesh Jayakodi <mukesh.jayakodi@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: HazarathKumarM <119284987+HazarathKumarM@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

* fix build errors

---------

Co-authored-by: sampath1117 <sampath.rachumallu@multicorewareinc.com>
Co-authored-by: HazarathKumarM <hazarathkumar@multicorewareinc.com>
Co-authored-by: Mukesh Jayakodi <mukesh.jayakodi@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: HazarathKumarM <119284987+HazarathKumarM@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Lokesh Bonta <lokeswara@multicorewareinc.com>
Co-authored-by: sampath117 <snehaa@multicorewareinc.com>
Co-authored-by: Srihari-mcw <srihari@multicorewareinc.com>
Co-authored-by: ManasaDattaT <tammisetti.manasadatta@multicorewareinc.com>
Co-authored-by: hmaddise <HazarathKumar.Maddisetty@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

[ROCm/rpp commit: 8f2d602]
mpanoop pushed a commit to mpanoop/rocm-libraries that referenced this pull request Oct 5, 2026
mpanoop pushed a commit to mpanoop/rocm-libraries that referenced this pull request Oct 5, 2026
LakshmiKumar23 added a commit that referenced this pull request Oct 30, 2026
… guards (#14765)

Issue Tracking JIRA ID : ROCM-33746

Fixes **Issue 1** (Blur / GaussianFilter / MedianFilter wrong on both
backends) and
**Issue 2** (Dilate / Erode wrong on HIP) of that ticket.

## Motivation

`rppt_box_filter`, `rppt_median_filter`, `rppt_gaussian_filter`,
`rppt_emboss`,
`rppt_erode` and `rppt_dilate` reject any src descriptor whose
`offsetInBytes` is below
`12 * (kernelSize / 2)`:

```cpp
if (srcDescPtr->offsetInBytes < 12 * (kernelSize / 2)) return RPP_ERROR_LOW_OFFSET;
```

The premise was that the HIP kernels load the first tile unconditionally
and therefore
need caller-supplied lead-in slack. That has not been true since the
kernels were given
their own border handling - box_filter in #597 ("Fixes for RPP Box
filter border
replicate"), erode/dilate in #666. Every one of these kernels now guards
its fast vector
load:

```cpp
if ((id_x_i >= 0) && ((id_x_i + 7) < roiWidth) && (id_y_i >= 0) && (id_y_i < roiHeight))
```

and falls back to a per-element path that clamps both coordinates into
`[0, roiWidth-1] x [0, roiHeight-1]` before touching `srcPtr`. No read
can leave the ROI,
so no caller padding is required. The guard is vestigial.

Keeping it forced callers to invent an offset they had not actually
allocated, which is
exactly what the OpenVX nodes in MIVisionX did: they set
`offsetInBytes = 12 * (kernelSize / 2)` on an unpadded tensor, so RPP
began reading 12
bytes into the image and ran 12 bytes past the end. Every filtered image
came out shifted
left by `offsetInBytes / channels` pixels - 4 px for RGB, 12 px for
greyscale - on both
the HOST and the HIP path.

## This is now urgent

MIVisionX #1820 has already merged the caller-side half of this fix
(`offsetInBytes = 0`
in Blur, Dilate, Erode, GaussianFilter and MedianFilter). With that
change in place and
this guard still present, the five filter ops no longer produce a
shifted image - they
fail outright on the GPU:

```
ERROR: kernel org.rpp.Dilate exec failed (-1:(null))
[ERR]  {output_routine}  Exception thrown in the process routine:  { process } ERROR: vxProcessGraph failed -1
```

So MIVisionX develop and rocm-libraries develop are currently
inconsistent, and the HIP
filter/morphology ops are broken until this lands.

## Technical Details

- Removed the six `RPP_ERROR_LOW_OFFSET` guards.
- In `rppt_erode` / `rppt_dilate` the guard sat in an `if/else if` ahead
of the backend
  dispatch, so the `else if` collapses back to a plain `if`.
- `RPP_ERROR_LOW_OFFSET` itself is left in `rppdefs.h` - it is public
API.
- A non-zero `offsetInBytes` keeps working. `emboss_test.cpp` still
passes a padded src on
purpose to keep that path covered; only its comment is updated, since it
claimed the pad
  was mandatory.

No kernel code is changed.

## Test Plan

1. RPP QA ctest, both backends.
2. The GoogleTest correctness suite for the six affected operators.
3. The same suite again with the caller pad removed - `offsetBytes = 0`
in
box_filter / gaussian_filter / median_filter / erode / dilate tests -
since neither
existing suite covers `offsetInBytes = 0` on these kernels. This is the
case that
   actually exercises the change.
4. rocAL's `tests/python_api/unit_tests.sh` end to end, stock libraries
vs this branch,
   on both backends.

## Test Result

**RPP QA ctest** - 100% passed, 0 failed:

```
1/2 Test #14: rpp_qa_tests_tensor_image_host_all ...   Passed  370.51 sec
2/2 Test #18: rpp_qa_tests_tensor_image_hip_all ....   Passed  619.19 sec
```

**GoogleTest, padded (unchanged contract)** - `4800 tests in 6 suites:
3924 OK, 876 SKIPPED, 0 FAILED`

**GoogleTest, `offsetInBytes = 0`** - identical pass counts with no
caller pad at all:

| Suite | padded | offset 0 |
| --- | --- | --- |
| BoxFilterTest | 654 OK | 654 OK |
| GaussianFilterTest | 964 OK | 964 OK |
| MedianFilterTest | 576 OK | 576 OK |
| DilateTest | 490 OK | 490 OK |
| ErodeTest | 490 OK | 490 OK |
| | | **3174 OK, 0 FAILED** |

**rocAL `unit_tests.sh` (RGB, this branch + MIVisionX #1820) - no
regressions:**

| Arm | before | after | newly passing |
| --- | --- | --- | --- |
| HOST | 64/74 | 66/74 | Blur, MedianFilter |
| HIP | 65/74 | 68/74 | Blur, MedianFilter, Dilate |

Blur, MedianFilter and Dilate are bit-exact against the shipped
`GoldenOutputsTensor`
references after the change; before it they matched only once shifted
back by
`offsetInBytes / channels` px (mean absolute error 0.0000 over the
interior). rocAL's
cpp_api unit tests show the same before/after on the same goldens.

## Not fixed here

Two residual defects are uncovered by this change rather than caused by
it - both were
masked by the shift, and both reproduce with the pad still in place:

- `gaussian_filter`: the outermost 1-px frame differs from the golden by
up to 84.
- `erode` on HIP: columns 0 and 415 differ by up to 247, while `dilate`
is bit-exact.

They are tracked separately and are not addressed by this PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

3 participants