From d1ae7c9575973e61d727fe23c38c1d2ede547f2d Mon Sep 17 00:00:00 2001 From: Bibek Ghimire Date: Thu, 14 May 2026 17:18:09 -0400 Subject: [PATCH 1/6] [hipDNN] ALMIOPEN-1944 Migrate golden reference system into integration tests Co-Authored-By: Claude Opus 4.6 --- .../integration-tests/CMakeLists.txt | 9 ++ .../src/harness/GoldenReferenceCpu.hpp | 69 +++++++++++++++ .../batchnorm/CMakeLists.txt | 1 + ...egrationGoldenRefBatchnormFwdInference.cpp | 88 +++++++++++++++++++ 4 files changed, 167 insertions(+) create mode 100644 dnn-providers/integration-tests/src/harness/GoldenReferenceCpu.hpp create mode 100644 dnn-providers/integration-tests/src/integration_tests/batchnorm/IntegrationGoldenRefBatchnormFwdInference.cpp diff --git a/dnn-providers/integration-tests/CMakeLists.txt b/dnn-providers/integration-tests/CMakeLists.txt index 6fe6ca51b97..25fd5937c36 100644 --- a/dnn-providers/integration-tests/CMakeLists.txt +++ b/dnn-providers/integration-tests/CMakeLists.txt @@ -111,6 +111,15 @@ fetch_gtest_dependency() set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +# Copy golden reference data into the build tree so tests can find it at +# /../lib/hipdnn_reference_data/ +set(HIPDNN_REFERENCE_DATA_SOURCE + "${ROCM_LIBRARIES_ROOT}/projects/hipdnn/hipdnn_reference_data") +if(EXISTS "${HIPDNN_REFERENCE_DATA_SOURCE}") + file(COPY "${HIPDNN_REFERENCE_DATA_SOURCE}/" + DESTINATION "${CMAKE_BINARY_DIR}/lib/hipdnn_reference_data") +endif() + set(INTEGRATION_TESTS_EXE hipdnn_integration_tests) add_executable(${INTEGRATION_TESTS_EXE} diff --git a/dnn-providers/integration-tests/src/harness/GoldenReferenceCpu.hpp b/dnn-providers/integration-tests/src/harness/GoldenReferenceCpu.hpp new file mode 100644 index 00000000000..432ae12bf69 --- /dev/null +++ b/dnn-providers/integration-tests/src/harness/GoldenReferenceCpu.hpp @@ -0,0 +1,69 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// SPDX-License-Identifier: MIT + +#pragma once + +#ifndef HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace hipdnn_integration_tests +{ + +class TestGoldenReferenceCpu : public ::testing::TestWithParam +{ +protected: + hipdnn_test_sdk::utilities::GraphAndTensorMap _graphAndTensors; + std::unordered_map> + _referenceOutputTensors; + + // NOLINTNEXTLINE(readability-identifier-naming) + void SetUp() override + { + const auto& path = GetParam(); + + // TODO: Temporary fix until reference data can be properly installed + if(path.empty()) + { + HIPDNN_SDK_LOG_WARN("Reference not found for Cpu golden reference test"); + GTEST_SKIP(); + } + + _graphAndTensors = hipdnn_test_sdk::utilities::loadGraphAndTensors(path); + _referenceOutputTensors = _graphAndTensors.extractAndClearOutputTensorData(); + } + + void goldenReferenceTestSuite(float absoluteTolerance, float relativeTolerance) + { + SKIP_IF_WINDOWS(); + + auto tensorMap = _graphAndTensors.hostBufferMap(); + + hipdnn_test_sdk::utilities::CpuReferenceGraphExecutor().execute( + _graphAndTensors.graphBuffer.data(), _graphAndTensors.graphBuffer.size(), tensorMap); + + EXPECT_TRUE(_graphAndTensors.validateTensors( + _referenceOutputTensors, absoluteTolerance, relativeTolerance)); + } +}; + +inline auto getGoldenReferenceParams(const std::filesystem::path& subDirectory) +{ + return testing::ValuesIn( + hipdnn_test_sdk::utilities::filesInDirectoryWithExtReturnEmptyPathOnThrow( + hipdnn_data_sdk::utilities::getCurrentExecutableDirectory() + / "../lib/hipdnn_reference_data" / subDirectory, + ".json")); +} +} + +#endif // HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB diff --git a/dnn-providers/integration-tests/src/integration_tests/batchnorm/CMakeLists.txt b/dnn-providers/integration-tests/src/integration_tests/batchnorm/CMakeLists.txt index df2c2c98918..d498881a19b 100644 --- a/dnn-providers/integration-tests/src/integration_tests/batchnorm/CMakeLists.txt +++ b/dnn-providers/integration-tests/src/integration_tests/batchnorm/CMakeLists.txt @@ -3,6 +3,7 @@ target_sources(${INTEGRATION_TESTS_EXE} PRIVATE + IntegrationGoldenRefBatchnormFwdInference.cpp IntegrationGpuBatchnormBackward.cpp IntegrationGpuBatchnormBackwardActivation.cpp IntegrationGpuBatchnormForwardInference.cpp diff --git a/dnn-providers/integration-tests/src/integration_tests/batchnorm/IntegrationGoldenRefBatchnormFwdInference.cpp b/dnn-providers/integration-tests/src/integration_tests/batchnorm/IntegrationGoldenRefBatchnormFwdInference.cpp new file mode 100644 index 00000000000..f988cc94482 --- /dev/null +++ b/dnn-providers/integration-tests/src/integration_tests/batchnorm/IntegrationGoldenRefBatchnormFwdInference.cpp @@ -0,0 +1,88 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// SPDX-License-Identifier: MIT + +#ifndef HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB + +#include + +#include +#include + +#include "harness/GoldenReferenceCpu.hpp" + +using namespace hipdnn_integration_tests; +using namespace hipdnn_data_sdk::types; +using namespace hipdnn_test_sdk::utilities; + +template +class TestCpuBatchnormFwdInferenceGoldenReference : public TestGoldenReferenceCpu +{ +public: + void testSuite() + { + return goldenReferenceTestSuite(batchnorm::getToleranceInference(), + batchnorm::getToleranceInference()); + } +}; + +class TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp32 + : public TestCpuBatchnormFwdInferenceGoldenReference +{ +}; + +class TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp16 + : public TestCpuBatchnormFwdInferenceGoldenReference +{ +}; + +class TestCpuBatchnormFwdInferenceGoldenReferenceNchwBfp16 + : public TestCpuBatchnormFwdInferenceGoldenReference +{ +}; + +class TestCpuBatchnormFwdInferenceGoldenReferenceNcdhwFp32 + : public TestCpuBatchnormFwdInferenceGoldenReference +{ +}; + +// Nchw Fp32------------ +TEST_P(TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp32, Correctness) +{ + testSuite(); +} + +INSTANTIATE_TEST_SUITE_P(, + TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp32, + getGoldenReferenceParams("BatchnormFwdInference/nchw/fp32")); + +// Nchw Fp16------------ +TEST_P(TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp16, Correctness) +{ + testSuite(); +} + +INSTANTIATE_TEST_SUITE_P(, + TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp16, + getGoldenReferenceParams("BatchnormFwdInference/nchw/fp16")); + +// Nchw Bfp16------------ +TEST_P(TestCpuBatchnormFwdInferenceGoldenReferenceNchwBfp16, Correctness) +{ + testSuite(); +} + +INSTANTIATE_TEST_SUITE_P(, + TestCpuBatchnormFwdInferenceGoldenReferenceNchwBfp16, + getGoldenReferenceParams("BatchnormFwdInference/nchw/bfp16")); + +// Ncdhw Fp32------------ +TEST_P(TestCpuBatchnormFwdInferenceGoldenReferenceNcdhwFp32, Correctness) +{ + testSuite(); +} + +INSTANTIATE_TEST_SUITE_P(, + TestCpuBatchnormFwdInferenceGoldenReferenceNcdhwFp32, + getGoldenReferenceParams("BatchnormFwdInference/ncdhw/fp32")); + +#endif // HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB From 2447dfcc10937dcfb3315e1bc620de0abfeaf58e Mon Sep 17 00:00:00 2001 From: Bibek Ghimire Date: Fri, 15 May 2026 10:46:10 -0400 Subject: [PATCH 2/6] [hipDNN] ALMIOPEN-1944 Remove golden ref originals from test_sdk 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 --- .../tests/utilities/GoldenReferenceCpu.hpp | 68 ---------------- .../utilities/TestCpuFpReferenceBatchnorm.cpp | 79 ------------------- 2 files changed, 147 deletions(-) delete mode 100644 projects/hipdnn/test_sdk/tests/utilities/GoldenReferenceCpu.hpp diff --git a/projects/hipdnn/test_sdk/tests/utilities/GoldenReferenceCpu.hpp b/projects/hipdnn/test_sdk/tests/utilities/GoldenReferenceCpu.hpp deleted file mode 100644 index 68a4e8085b6..00000000000 --- a/projects/hipdnn/test_sdk/tests/utilities/GoldenReferenceCpu.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright © Advanced Micro Devices, Inc., or its affiliates. -// SPDX-License-Identifier: MIT - -#pragma once - -#ifndef HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB - -#include -#include -#include - -#include -#include -#include - -#include - -namespace hipdnn_test_sdk::utilities -{ - -class TestGoldenReferenceCpu : public ::testing::TestWithParam -{ -protected: - hipdnn_test_sdk::utilities::GraphAndTensorMap _graphAndTensors; - std::unordered_map> - _referenceOutputTensors; - - // NOLINTNEXTLINE(readability-identifier-naming) - void SetUp() override - { - const auto& path = GetParam(); - - // TODO: Temporary fix until reference data can be properly installed - if(path.empty()) - { - HIPDNN_SDK_LOG_WARN("Reference not found for Cpu golden reference test"); - GTEST_SKIP(); - } - - _graphAndTensors = hipdnn_test_sdk::utilities::loadGraphAndTensors(path); - _referenceOutputTensors = _graphAndTensors.extractAndClearOutputTensorData(); - } - - void goldenReferenceTestSuite(float absoluteTolerance, float relativeTolerance) - { - SKIP_IF_WINDOWS(); - - auto tensorMap = _graphAndTensors.hostBufferMap(); - EXPECT_EQ(tensorMap.size(), 6); - - CpuReferenceGraphExecutor().execute( - _graphAndTensors.graphBuffer.data(), _graphAndTensors.graphBuffer.size(), tensorMap); - - EXPECT_TRUE(_graphAndTensors.validateTensors( - _referenceOutputTensors, absoluteTolerance, relativeTolerance)); - } -}; - -inline auto getGoldenReferenceParams(const std::filesystem::path& subDirectory) -{ - return testing::ValuesIn(filesInDirectoryWithExtReturnEmptyPathOnThrow( - hipdnn_data_sdk::utilities::getCurrentExecutableDirectory() / "../lib/hipdnn_reference_data" - / subDirectory, - ".json")); -} -} - -#endif // HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB diff --git a/projects/hipdnn/test_sdk/tests/utilities/TestCpuFpReferenceBatchnorm.cpp b/projects/hipdnn/test_sdk/tests/utilities/TestCpuFpReferenceBatchnorm.cpp index b8fd2d25886..e0e14cce88a 100644 --- a/projects/hipdnn/test_sdk/tests/utilities/TestCpuFpReferenceBatchnorm.cpp +++ b/projects/hipdnn/test_sdk/tests/utilities/TestCpuFpReferenceBatchnorm.cpp @@ -15,91 +15,12 @@ #include #include -#ifndef HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB -#include "GoldenReferenceCpu.hpp" -#endif - using namespace hipdnn_test_sdk::utilities; using namespace hipdnn_flatbuffers_sdk::data_objects; using namespace hipdnn_data_sdk::utilities; using namespace hipdnn_data_sdk::types; using hipdnn_test_sdk::detail::safeTestTypeCast; -#ifndef HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB - -template -class TestCpuBatchnormFwdInferenceGoldenReference : public TestGoldenReferenceCpu -{ -public: - void testSuite() - { - return goldenReferenceTestSuite(batchnorm::getToleranceInference(), - batchnorm::getToleranceInference()); - } -}; - -class TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp32 - : public TestCpuBatchnormFwdInferenceGoldenReference -{ -}; - -class TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp16 - : public TestCpuBatchnormFwdInferenceGoldenReference -{ -}; - -class TestCpuBatchnormFwdInferenceGoldenReferenceNchwBfp16 - : public TestCpuBatchnormFwdInferenceGoldenReference -{ -}; - -class TestCpuBatchnormFwdInferenceGoldenReferenceNcdhwFp32 - : public TestCpuBatchnormFwdInferenceGoldenReference -{ -}; - -// Nchw Fp32------------ -TEST_P(TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp32, Correctness) -{ - testSuite(); -} - -INSTANTIATE_TEST_SUITE_P(, - TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp32, - getGoldenReferenceParams("BatchnormFwdInference/nchw/fp32")); - -// Nchw Fp16------------ -TEST_P(TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp16, Correctness) -{ - testSuite(); -} - -INSTANTIATE_TEST_SUITE_P(, - TestCpuBatchnormFwdInferenceGoldenReferenceNchwFp16, - getGoldenReferenceParams("BatchnormFwdInference/nchw/fp16")); - -// Nchw Bfp16------------ -TEST_P(TestCpuBatchnormFwdInferenceGoldenReferenceNchwBfp16, Correctness) -{ - testSuite(); -} - -INSTANTIATE_TEST_SUITE_P(, - TestCpuBatchnormFwdInferenceGoldenReferenceNchwBfp16, - getGoldenReferenceParams("BatchnormFwdInference/nchw/bfp16")); - -// Ncdhw Fp32------------ -TEST_P(TestCpuBatchnormFwdInferenceGoldenReferenceNcdhwFp32, Correctness) -{ - testSuite(); -} - -INSTANTIATE_TEST_SUITE_P(, - TestCpuBatchnormFwdInferenceGoldenReferenceNcdhwFp32, - getGoldenReferenceParams("BatchnormFwdInference/ncdhw/fp32")); - -#endif // HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB - //-------------------------- template From e5d3101cef47854bfb531322eeeffaea9a006b14 Mon Sep 17 00:00:00 2001 From: Bibek Ghimire Date: Fri, 15 May 2026 12:39:39 -0400 Subject: [PATCH 3/6] [hipDNN] ALMIOPEN-1944 Move reference data and generation scripts to 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 --- dnn-providers/integration-tests/CMakeLists.txt | 8 ++------ .../BatchnormFwdInference/ncdhw/fp32/Small.json | 0 .../ncdhw/fp32/Small.tensor0.bin | Bin .../ncdhw/fp32/Small.tensor1.bin | 0 .../ncdhw/fp32/Small.tensor2.bin | 0 .../ncdhw/fp32/Small.tensor3.bin | 0 .../ncdhw/fp32/Small.tensor4.bin | 0 .../ncdhw/fp32/Small.tensor5.bin | Bin .../BatchnormFwdInference/nchw/bfp16/Small.json | 0 .../nchw/bfp16/Small.tensor0.bin | Bin .../nchw/bfp16/Small.tensor1.bin | 0 .../nchw/bfp16/Small.tensor2.bin | 0 .../nchw/bfp16/Small.tensor3.bin | 0 .../nchw/bfp16/Small.tensor4.bin | 0 .../nchw/bfp16/Small.tensor5.bin | Bin .../BatchnormFwdInference/nchw/fp16/Small.json | 0 .../nchw/fp16/Small.tensor0.bin | Bin .../nchw/fp16/Small.tensor1.bin | 0 .../nchw/fp16/Small.tensor2.bin | 0 .../nchw/fp16/Small.tensor3.bin | 0 .../nchw/fp16/Small.tensor4.bin | 0 .../nchw/fp16/Small.tensor5.bin | Bin .../BatchnormFwdInference/nchw/fp32/Large.json | 0 .../nchw/fp32/Large.tensor0.bin | Bin .../nchw/fp32/Large.tensor1.bin | Bin .../nchw/fp32/Large.tensor2.bin | 0 .../nchw/fp32/Large.tensor3.bin | Bin .../nchw/fp32/Large.tensor4.bin | 0 .../nchw/fp32/Large.tensor5.bin | Bin .../BatchnormFwdInference/nchw/fp32/MIOpen.json | 0 .../nchw/fp32/MIOpen.tensor0.bin | 0 .../nchw/fp32/MIOpen.tensor1.bin | 0 .../nchw/fp32/MIOpen.tensor2.bin | 0 .../nchw/fp32/MIOpen.tensor3.bin | 0 .../nchw/fp32/MIOpen.tensor4.bin | 0 .../nchw/fp32/MIOpen.tensor5.bin | 0 .../BatchnormFwdInference/nchw/fp32/Small.json | 0 .../nchw/fp32/Small.tensor0.bin | Bin .../nchw/fp32/Small.tensor1.bin | 0 .../nchw/fp32/Small.tensor2.bin | 0 .../nchw/fp32/Small.tensor3.bin | 0 .../nchw/fp32/Small.tensor4.bin | 0 .../nchw/fp32/Small.tensor5.bin | 0 .../generate_batchnorm_reference.py | 0 .../utilities/batchnorm_inference.py | 0 .../reference_data_scripts/utilities/common.py | 0 .../reference_data_scripts/utilities/graph.py | 0 .../reference_data_scripts/utilities/tensor.py | 0 projects/hipdnn/CMakeLists.txt | 10 +++++++--- 49 files changed, 9 insertions(+), 9 deletions(-) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.json (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor0.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor1.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor2.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor3.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor4.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor5.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.json (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor0.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor1.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor2.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor3.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor4.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor5.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.json (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor0.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor1.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor2.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor3.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor4.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor5.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.json (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor0.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor1.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor2.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor3.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor4.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor5.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.json (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor0.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor1.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor2.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor3.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor4.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor5.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.json (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor0.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor1.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor2.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor3.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor4.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor5.bin (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/reference_data_scripts/generate_batchnorm_reference.py (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/reference_data_scripts/utilities/batchnorm_inference.py (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/reference_data_scripts/utilities/common.py (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/reference_data_scripts/utilities/graph.py (100%) rename {projects/hipdnn => dnn-providers/integration-tests}/reference_data_scripts/utilities/tensor.py (100%) diff --git a/dnn-providers/integration-tests/CMakeLists.txt b/dnn-providers/integration-tests/CMakeLists.txt index 25fd5937c36..0338d1b8717 100644 --- a/dnn-providers/integration-tests/CMakeLists.txt +++ b/dnn-providers/integration-tests/CMakeLists.txt @@ -113,12 +113,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) # Copy golden reference data into the build tree so tests can find it at # /../lib/hipdnn_reference_data/ -set(HIPDNN_REFERENCE_DATA_SOURCE - "${ROCM_LIBRARIES_ROOT}/projects/hipdnn/hipdnn_reference_data") -if(EXISTS "${HIPDNN_REFERENCE_DATA_SOURCE}") - file(COPY "${HIPDNN_REFERENCE_DATA_SOURCE}/" - DESTINATION "${CMAKE_BINARY_DIR}/lib/hipdnn_reference_data") -endif() +file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/hipdnn_reference_data/" + DESTINATION "${CMAKE_BINARY_DIR}/lib/hipdnn_reference_data") set(INTEGRATION_TESTS_EXE hipdnn_integration_tests) diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.json b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.json similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.json rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.json diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor0.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor0.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor0.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor0.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor1.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor1.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor1.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor1.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor2.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor2.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor2.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor2.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor3.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor3.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor3.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor3.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor4.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor4.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor4.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor4.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor5.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor5.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor5.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/ncdhw/fp32/Small.tensor5.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.json b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.json similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.json rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.json diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor0.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor0.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor0.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor0.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor1.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor1.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor1.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor1.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor2.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor2.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor2.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor2.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor3.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor3.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor3.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor3.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor4.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor4.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor4.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor4.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor5.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor5.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor5.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/bfp16/Small.tensor5.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.json b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.json similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.json rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.json diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor0.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor0.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor0.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor0.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor1.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor1.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor1.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor1.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor2.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor2.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor2.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor2.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor3.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor3.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor3.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor3.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor4.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor4.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor4.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor4.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor5.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor5.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor5.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp16/Small.tensor5.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.json b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.json similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.json rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.json diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor0.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor0.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor0.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor0.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor1.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor1.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor1.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor1.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor2.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor2.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor2.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor2.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor3.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor3.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor3.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor3.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor4.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor4.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor4.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor4.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor5.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor5.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor5.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Large.tensor5.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.json b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.json similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.json rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.json diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor0.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor0.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor0.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor0.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor1.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor1.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor1.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor1.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor2.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor2.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor2.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor2.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor3.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor3.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor3.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor3.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor4.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor4.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor4.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor4.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor5.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor5.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor5.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/MIOpen.tensor5.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.json b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.json similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.json rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.json diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor0.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor0.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor0.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor0.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor1.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor1.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor1.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor1.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor2.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor2.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor2.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor2.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor3.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor3.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor3.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor3.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor4.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor4.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor4.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor4.bin diff --git a/projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor5.bin b/dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor5.bin similarity index 100% rename from projects/hipdnn/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor5.bin rename to dnn-providers/integration-tests/hipdnn_reference_data/BatchnormFwdInference/nchw/fp32/Small.tensor5.bin diff --git a/projects/hipdnn/reference_data_scripts/generate_batchnorm_reference.py b/dnn-providers/integration-tests/reference_data_scripts/generate_batchnorm_reference.py similarity index 100% rename from projects/hipdnn/reference_data_scripts/generate_batchnorm_reference.py rename to dnn-providers/integration-tests/reference_data_scripts/generate_batchnorm_reference.py diff --git a/projects/hipdnn/reference_data_scripts/utilities/batchnorm_inference.py b/dnn-providers/integration-tests/reference_data_scripts/utilities/batchnorm_inference.py similarity index 100% rename from projects/hipdnn/reference_data_scripts/utilities/batchnorm_inference.py rename to dnn-providers/integration-tests/reference_data_scripts/utilities/batchnorm_inference.py diff --git a/projects/hipdnn/reference_data_scripts/utilities/common.py b/dnn-providers/integration-tests/reference_data_scripts/utilities/common.py similarity index 100% rename from projects/hipdnn/reference_data_scripts/utilities/common.py rename to dnn-providers/integration-tests/reference_data_scripts/utilities/common.py diff --git a/projects/hipdnn/reference_data_scripts/utilities/graph.py b/dnn-providers/integration-tests/reference_data_scripts/utilities/graph.py similarity index 100% rename from projects/hipdnn/reference_data_scripts/utilities/graph.py rename to dnn-providers/integration-tests/reference_data_scripts/utilities/graph.py diff --git a/projects/hipdnn/reference_data_scripts/utilities/tensor.py b/dnn-providers/integration-tests/reference_data_scripts/utilities/tensor.py similarity index 100% rename from projects/hipdnn/reference_data_scripts/utilities/tensor.py rename to dnn-providers/integration-tests/reference_data_scripts/utilities/tensor.py diff --git a/projects/hipdnn/CMakeLists.txt b/projects/hipdnn/CMakeLists.txt index aca3eca02c3..2b14c93b48c 100644 --- a/projects/hipdnn/CMakeLists.txt +++ b/projects/hipdnn/CMakeLists.txt @@ -114,9 +114,13 @@ set(HIPDNN_TEST_REFERENCE_DIR "${CMAKE_BINARY_DIR}/lib/hipdnn_reference_data" set(HIPDNN_TEST_REFERENCE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE INTERNAL "Install directory for test reference data" ) -file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/hipdnn_reference_data/" - DESTINATION ${HIPDNN_TEST_REFERENCE_DIR} -) # Copies only on calls to cmake +set(_hipdnn_ref_data_src + "${CMAKE_SOURCE_DIR}/dnn-providers/integration-tests/hipdnn_reference_data") +if(EXISTS "${_hipdnn_ref_data_src}") + file(COPY "${_hipdnn_ref_data_src}/" + DESTINATION ${HIPDNN_TEST_REFERENCE_DIR} + ) +endif() install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/hipdnn_reference_data" DESTINATION ${HIPDNN_TEST_REFERENCE_INSTALL_DIR} ) From bf8d26862874182a0aa81788004ee4025a5da0ab Mon Sep 17 00:00:00 2001 From: Bibek Ghimire Date: Fri, 15 May 2026 14:22:35 -0400 Subject: [PATCH 4/6] [hipDNN] ALMIOPEN-1944 Guard install of reference data for standalone 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 --- projects/hipdnn/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/hipdnn/CMakeLists.txt b/projects/hipdnn/CMakeLists.txt index 2b14c93b48c..2cb0ba4bed6 100644 --- a/projects/hipdnn/CMakeLists.txt +++ b/projects/hipdnn/CMakeLists.txt @@ -121,9 +121,11 @@ if(EXISTS "${_hipdnn_ref_data_src}") DESTINATION ${HIPDNN_TEST_REFERENCE_DIR} ) endif() -install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/hipdnn_reference_data" - DESTINATION ${HIPDNN_TEST_REFERENCE_INSTALL_DIR} -) +if(EXISTS "${HIPDNN_TEST_REFERENCE_DIR}") + install(DIRECTORY "${HIPDNN_TEST_REFERENCE_DIR}" + DESTINATION ${HIPDNN_TEST_REFERENCE_INSTALL_DIR} + ) +endif() # Migrate HIP_DNN_BUILD_BACKEND -> HIPDNN_BUILD_BACKEND if(DEFINED HIP_DNN_BUILD_BACKEND) From eb47cac6c6b6b517e96c4a968729b9244073db63 Mon Sep 17 00:00:00 2001 From: Bibek Ghimire Date: Fri, 15 May 2026 14:37:06 -0400 Subject: [PATCH 5/6] [hipDNN] ALMIOPEN-1944 Update pre-commit exclusion for relocated reference 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 --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0808b67c662..44b6ea1fd41 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,8 +47,8 @@ exclude: | projects/hipdnn/.*\.bin$| # Generated hipDNN FlatBuffers headers projects/hipdnn/flatbuffers_sdk/include/hipdnn_flatbuffers_sdk/data_objects/.*_generated\.h| - # Reference data - projects/hipdnn/hipdnn_reference_data/.*| + # Reference data (auto-generated) + dnn-providers/integration-tests/hipdnn_reference_data/.*| # Generated files (see rocrand/tools/ _generator.cpp files) projects/rocrand/library/.*constants\.(cpp|h)| projects/rocrand/library/.*precomputed\.(cpp|h) From 7405bafacf3db557a0245aec65961a364fabc525 Mon Sep 17 00:00:00 2001 From: Bibek Ghimire Date: Fri, 15 May 2026 15:58:00 -0400 Subject: [PATCH 6/6] [hipDNN] ALMIOPEN-1944 Add .gitattributes to protect binary reference data Mark *.bin files as binary to prevent line-ending corruption from git autocrlf or merge tools. Co-Authored-By: Claude Opus 4.6 --- .../integration-tests/hipdnn_reference_data/.gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 dnn-providers/integration-tests/hipdnn_reference_data/.gitattributes diff --git a/dnn-providers/integration-tests/hipdnn_reference_data/.gitattributes b/dnn-providers/integration-tests/hipdnn_reference_data/.gitattributes new file mode 100644 index 00000000000..291377b6b38 --- /dev/null +++ b/dnn-providers/integration-tests/hipdnn_reference_data/.gitattributes @@ -0,0 +1 @@ +*.bin binary