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) diff --git a/dnn-providers/integration-tests/CMakeLists.txt b/dnn-providers/integration-tests/CMakeLists.txt index 6fe6ca51b97..0338d1b8717 100644 --- a/dnn-providers/integration-tests/CMakeLists.txt +++ b/dnn-providers/integration-tests/CMakeLists.txt @@ -111,6 +111,11 @@ 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/ +file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/hipdnn_reference_data/" + DESTINATION "${CMAKE_BINARY_DIR}/lib/hipdnn_reference_data") + set(INTEGRATION_TESTS_EXE hipdnn_integration_tests) add_executable(${INTEGRATION_TESTS_EXE} 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 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/test_sdk/tests/utilities/GoldenReferenceCpu.hpp b/dnn-providers/integration-tests/src/harness/GoldenReferenceCpu.hpp similarity index 79% rename from projects/hipdnn/test_sdk/tests/utilities/GoldenReferenceCpu.hpp rename to dnn-providers/integration-tests/src/harness/GoldenReferenceCpu.hpp index 68a4e8085b6..432ae12bf69 100644 --- a/projects/hipdnn/test_sdk/tests/utilities/GoldenReferenceCpu.hpp +++ b/dnn-providers/integration-tests/src/harness/GoldenReferenceCpu.hpp @@ -11,11 +11,12 @@ #include #include -#include - +#include #include +#include +#include -namespace hipdnn_test_sdk::utilities +namespace hipdnn_integration_tests { class TestGoldenReferenceCpu : public ::testing::TestWithParam @@ -46,9 +47,8 @@ class TestGoldenReferenceCpu : public ::testing::TestWithParam + +#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 diff --git a/projects/hipdnn/CMakeLists.txt b/projects/hipdnn/CMakeLists.txt index aca3eca02c3..2cb0ba4bed6 100644 --- a/projects/hipdnn/CMakeLists.txt +++ b/projects/hipdnn/CMakeLists.txt @@ -114,12 +114,18 @@ 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 -install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/hipdnn_reference_data" - DESTINATION ${HIPDNN_TEST_REFERENCE_INSTALL_DIR} -) +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() +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) 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