Skip to content

[hipDNN] Migrate golden reference system into integration tests#7480

Open
bghimireamd wants to merge 6 commits into
developfrom
users/bghimire/ALMIOPEN-1944/migrate-golden-ref-to-integration-tests
Open

[hipDNN] Migrate golden reference system into integration tests#7480
bghimireamd wants to merge 6 commits into
developfrom
users/bghimire/ALMIOPEN-1944/migrate-golden-ref-to-integration-tests

Conversation

@bghimireamd
Copy link
Copy Markdown
Contributor

@bghimireamd bghimireamd commented May 14, 2026

Note: This is Phase 1 of the golden reference migration — relocating existing files with minimal changes. Future phases will focus on validating reference data bundles, strengthening the verification framework, and then expanding coverage to additional operations.

Summary

  • Migrate golden reference validation system from test_sdk into integration-tests
  • Add GoldenReferenceCpu.hpp harness adapted for the integration-tests namespace
  • Add batchnorm forward inference golden reference tests (4 test suites, 6 tests)
  • Remove original golden ref files from test_sdk to complete the relocation
  • Move hipdnn_reference_data/ and reference_data_scripts/ from projects/hipdnn/ to integration-tests/
  • Update CMake and pre-commit config for the new paths

Test plan

  • hipdnn_integration_tests builds successfully
  • hipdnn_test_sdk_tests builds successfully (no regressions)
  • cmake --install succeeds (mono-repo and standalone)
  • Golden ref test suites discoverable via --gtest_list_tests
  • All 6 golden reference tests pass

🤖 Generated with Claude Code

…on tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bghimireamd bghimireamd requested a review from a team as a code owner May 14, 2026 21:18
@bghimireamd bghimireamd changed the title [hipDNN] ALMIOPEN-1944 Migrate golden reference system into integration tests [hipDNN] Migrate golden reference system into integration tests May 14, 2026
@bghimireamd bghimireamd marked this pull request as draft May 15, 2026 13:56
Complete the relocation by removing the original golden reference
files from test_sdk now that they live in integration-tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

❌ Your project status has failed because the head coverage (69.24%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7480      +/-   ##
===========================================
- Coverage    60.33%   60.31%   -0.02%     
===========================================
  Files         1179     1181       +2     
  Lines       215587   216054     +467     
  Branches     22951    23011      +60     
===========================================
+ Hits        130071   130311     +240     
- Misses       76997    77206     +209     
- Partials      8519     8537      +18     
Flag Coverage Δ *Carryforward flag
hipBLAS 90.65% <ø> (ø) Carriedforward from eb47cac
hipBLASLt 40.24% <ø> (ø) Carriedforward from eb47cac
hipCUB 82.21% <ø> (ø) Carriedforward from eb47cac
hipDNN 85.15% <ø> (-0.36%) ⬇️
hipFFT 49.22% <ø> (ø) Carriedforward from eb47cac
hipSOLVER 69.24% <ø> (ø) Carriedforward from eb47cac
rocBLAS 48.11% <ø> (ø) Carriedforward from eb47cac
rocFFT 47.60% <ø> (ø) Carriedforward from eb47cac
rocPRIM 38.99% <ø> (ø) Carriedforward from eb47cac
rocRAND 57.02% <ø> (ø) Carriedforward from eb47cac

*This pull request uses carry forward flags. Click here to find out more.
see 20 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

bghimireamd and others added 3 commits May 15, 2026 12:39
…integration-tests

Move hipdnn_reference_data/ and reference_data_scripts/ from
projects/hipdnn/ to dnn-providers/integration-tests/ so the golden
reference data lives alongside the tests that consume it.

Update CMake paths in both integration-tests and hipdnn CMakeLists to
reflect the new location, with an if(EXISTS) guard in hipdnn for
standalone builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… builds

The install() for hipdnn_reference_data was unconditional but the
file(COPY) that populates the build tree is guarded by if(EXISTS).
In standalone builds (e.g. TheRock CI) where the reference data
source does not exist, the copy is skipped but install fails.

Wrap install() in if(EXISTS) so it is skipped when the data was
not copied into the build tree.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rence data

The reference data (.json and .bin files) moved from
projects/hipdnn/hipdnn_reference_data/ to
dnn-providers/integration-tests/hipdnn_reference_data/ but the
pre-commit exclusion pattern still pointed to the old path, causing
the end-of-file-fixer hook to fail in CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bghimireamd bghimireamd force-pushed the users/bghimire/ALMIOPEN-1944/migrate-golden-ref-to-integration-tests branch from ce27f37 to eb47cac Compare May 15, 2026 18:54
@bghimireamd bghimireamd marked this pull request as ready for review May 15, 2026 19:29
@bghimireamd bghimireamd requested a review from a team as a code owner May 15, 2026 19:29
… data

Mark *.bin files as binary to prevent line-ending corruption
from git autocrlf or merge tools.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/hipdnn_reference_data"
DESTINATION ${HIPDNN_TEST_REFERENCE_INSTALL_DIR}
)
set(_hipdnn_ref_data_src
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does this belong here anymore? should it just be in the integration-tests project?


# Copy golden reference data into the build tree so tests can find it at
# <exe_dir>/../lib/hipdnn_reference_data/
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/hipdnn_reference_data/"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should probably mention this only copies at configure time.

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