CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
143 lines
5.0 KiB
CMake
143 lines
5.0 KiB
CMake
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
include(GoogleTest)
|
|
|
|
if(HIPDNN_SKIP_TESTS)
|
|
message(STATUS "Skipping HIP-DNN Frontend Unit tests")
|
|
return()
|
|
endif()
|
|
|
|
find_package(hip REQUIRED)
|
|
find_package(Threads REQUIRED)
|
|
|
|
add_executable(
|
|
hipdnn_frontend_tests
|
|
main.cpp
|
|
TestAttributes.cpp
|
|
TestBackendFactory.cpp
|
|
TestBackendLoggingHelpers.cpp
|
|
TestBlockScaleDequantizeAttributes.cpp
|
|
TestBlockScaleDequantizeNode.cpp
|
|
TestBlockScaleQuantizeAttributes.cpp
|
|
TestBlockScaleQuantizeNode.cpp
|
|
TestBatchnormAttributes.cpp
|
|
TestBatchnormBackwardAttributes.cpp
|
|
TestBatchnormBackwardNode.cpp
|
|
TestBatchnormInferenceAttributes.cpp
|
|
TestBatchnormInferenceAttributesVarianceExt.cpp
|
|
TestBatchnormInferenceNode.cpp
|
|
TestBatchnormInferenceNodeVarianceExt.cpp
|
|
TestBatchnormNode.cpp
|
|
TestCustomOpAttributes.cpp
|
|
TestCustomOpNode.cpp
|
|
TestConvolutionDgradAttributes.cpp
|
|
TestConvolutionFwdAttributes.cpp
|
|
TestConvolutionDgradNode.cpp
|
|
TestConvolutionNode.cpp
|
|
TestConvolutionWgradAttributes.cpp
|
|
# cuDNN-compatibility shim tests; only built when the shim is enabled.
|
|
$<$<BOOL:${HIPDNN_ENABLE_CUDNN_COMPATIBILITY}>:TestCudnnShimUmbrellaCompiles.cpp>
|
|
$<$<BOOL:${HIPDNN_ENABLE_CUDNN_COMPATIBILITY}>:TestCudnnShimHandle.cpp>
|
|
$<$<BOOL:${HIPDNN_ENABLE_CUDNN_COMPATIBILITY}>:TestCudnnShimStatusTranslationStandalone.cpp>
|
|
$<$<BOOL:${HIPDNN_ENABLE_CUDNN_COMPATIBILITY}>:TestCudnnShimError.cpp>
|
|
$<$<BOOL:${HIPDNN_ENABLE_CUDNN_COMPATIBILITY}>:TestCudnnShimTensor.cpp>
|
|
$<$<BOOL:${HIPDNN_ENABLE_CUDNN_COMPATIBILITY}>:TestCudnnShimV9Tu.cpp>
|
|
$<$<BOOL:${HIPDNN_ENABLE_CUDNN_COMPATIBILITY}>:TestCudnnShimGraph.cpp>
|
|
# SDPA node coverage additionally needs the SDPA build.
|
|
$<$<AND:$<BOOL:${HIPDNN_ENABLE_CUDNN_COMPATIBILITY}>,$<BOOL:${HIPDNN_ENABLE_SDPA}>>:TestCudnnShimGraphSDPA.cpp>
|
|
TestDescriptorHelpers.cpp
|
|
TestDescriptorUnpackHelpers.cpp
|
|
TestConvolutionWgradNode.cpp
|
|
TestError.cpp
|
|
TestFrontendLogging.cpp
|
|
TestGraph.cpp
|
|
TestGraphAttributes.cpp
|
|
TestGraphMatchKey.cpp
|
|
TestGraphOverrideValidation.cpp
|
|
TestHandle.cpp
|
|
TestHeuristicPolicyInfo.cpp
|
|
TestIncompatibleBackendWrapper.cpp
|
|
TestINode.cpp
|
|
TestKnob.cpp
|
|
TestKnobUnpacker.cpp
|
|
TestLayernormAttributes.cpp
|
|
TestLayerNormNode.cpp
|
|
TestLayernormBackwardAttributes.cpp
|
|
TestLayernormBackwardNode.cpp
|
|
TestGraphLayernormBackward.cpp
|
|
TestMatmulAttributes.cpp
|
|
TestMatmulNode.cpp
|
|
TestNode.cpp
|
|
TestOperationUnpacker.cpp
|
|
TestSdpaAttributes.cpp
|
|
TestSdpaBackwardAttributes.cpp
|
|
TestSdpaBwdNode.cpp
|
|
TestSdpaFwdNode.cpp
|
|
TestPointwiseAttributes.cpp
|
|
TestPointwiseNode.cpp
|
|
TestReductionAttributes.cpp
|
|
TestReductionNode.cpp
|
|
TestResampleFwdAttributes.cpp
|
|
TestResampleFwdNode.cpp
|
|
TestRMSNormAttributes.cpp
|
|
TestRMSNormNode.cpp
|
|
TestRMSNormBackwardAttributes.cpp
|
|
TestRMSNormBackwardNode.cpp
|
|
TestScopedHipdnnBackendDescriptor.cpp
|
|
TestSetEnginePluginPaths.cpp
|
|
TestTensorAttributes.cpp
|
|
TestTensorValueAttributes.cpp
|
|
TestTypes.cpp
|
|
TestUtilities.cpp
|
|
TestTopologicalSortingUtils.cpp
|
|
TestSdkLogging.cpp
|
|
TestVersion.cpp
|
|
TestAutotune.cpp
|
|
TestAutotuneFileWriter.cpp
|
|
TestAutotuneTypes.cpp
|
|
)
|
|
|
|
target_compile_options(hipdnn_frontend_tests PRIVATE ${HIPDNN_WARNING_COMPILE_OPTIONS})
|
|
|
|
target_link_libraries(
|
|
hipdnn_frontend_tests GTest::gtest GTest::gmock hip::host Threads::Threads hipdnn_test_sdk
|
|
)
|
|
clang_tidy_check(hipdnn_frontend_tests)
|
|
|
|
add_hipdnn_test(hipdnn_frontend_tests ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
# Runtime-load static check. Links the shipped hipdnn_frontend_dynamic target,
|
|
# which compiles the umbrella with HIPDNN_FRONTEND_RUNTIME_LOAD_BACKEND and links
|
|
# WITHOUT libhipdnn_backend. A successful link therefore proves that, in
|
|
# runtime-load mode, no backend symbol is referenced directly. This exercises the
|
|
# exact target a downstream consumer would link.
|
|
add_executable(
|
|
hipdnn_frontend_dynamic_load_tests
|
|
TestRuntimeLoadBackendFactory.cpp
|
|
TestRuntimeLoadBackendStaticCheck.cpp
|
|
)
|
|
|
|
target_compile_options(hipdnn_frontend_dynamic_load_tests PRIVATE ${HIPDNN_WARNING_COMPILE_OPTIONS})
|
|
|
|
target_link_libraries(
|
|
hipdnn_frontend_dynamic_load_tests
|
|
GTest::gtest GTest::gtest_main Threads::Threads hipdnn_frontend_dynamic
|
|
)
|
|
if(TARGET hipdnn_backend)
|
|
add_dependencies(hipdnn_frontend_dynamic_load_tests hipdnn_backend)
|
|
target_compile_definitions(
|
|
hipdnn_frontend_dynamic_load_tests PRIVATE HIPDNN_TEST_EXPECT_BACKEND_LIBRARY
|
|
)
|
|
endif()
|
|
|
|
add_hipdnn_test(
|
|
hipdnn_frontend_dynamic_load_tests ${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
# Under ASAN the dlopen interceptor ignores the executable RUNPATH, so
|
|
# the bare-name backend .so is only found via LD_LIBRARY_PATH.
|
|
if(BUILD_ADDRESS_SANITIZER OR THEROCK_SANITIZER STREQUAL "ASAN")
|
|
set_property(TEST hipdnn_frontend_dynamic_load_tests APPEND PROPERTY
|
|
ENVIRONMENT_MODIFICATION "LD_LIBRARY_PATH=path_list_prepend:$<TARGET_FILE_DIR:hipdnn_backend>")
|
|
endif()
|