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
77 lines
2.5 KiB
CMake
77 lines
2.5 KiB
CMake
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
include(GoogleTest)
|
|
|
|
if(HIPDNN_SKIP_TESTS)
|
|
message(STATUS "Skipping Flatbuffers SDK tests")
|
|
return()
|
|
endif()
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
add_compile_definitions(__HIP_PLATFORM_AMD__)
|
|
find_package(hip REQUIRED)
|
|
|
|
add_executable(
|
|
hipdnn_flatbuffers_sdk_tests
|
|
main.cpp
|
|
TestVersion.cpp
|
|
flatbuffer_utilities/TestEngineConfigWrapper.cpp
|
|
flatbuffer_utilities/TestEngineDetailsWrapper.cpp
|
|
flatbuffer_utilities/TestGraphWrapper.cpp
|
|
flatbuffer_utilities/TestNodeWrapper.cpp
|
|
flatbuffer_utilities/TestKnobWrapper.cpp
|
|
flatbuffer_utilities/TestKnobSettingWrapper.cpp
|
|
flatbuffer_utilities/TestSerializedGraphContainer.cpp
|
|
flatbuffer_utilities/TestTensorAttributesWrapper.cpp
|
|
utilities/TestApplicabilityUtils.cpp
|
|
utilities/TestFlatbufferUtils.cpp
|
|
utilities/TestJson.cpp
|
|
utilities/TestPointwiseValidation.cpp
|
|
)
|
|
|
|
target_compile_options(hipdnn_flatbuffers_sdk_tests PRIVATE ${HIPDNN_WARNING_COMPILE_OPTIONS} ${HIPDNN_NO_RTTI_OPTIONS})
|
|
|
|
# Fetch flatbuffers include dirs explicitly. Although hipdnn_flatbuffers_sdk propagates these
|
|
# transitively for compilation, per-file clang-tidy (CXX_CLANG_TIDY) does not pick them up
|
|
# automatically. We add them here and again as -extra-arg below so clang-tidy can resolve
|
|
# flatbuffers headers.
|
|
get_target_property(_fb_include_dirs flatbuffers::flatbuffers INTERFACE_INCLUDE_DIRECTORIES)
|
|
|
|
target_include_directories(
|
|
hipdnn_flatbuffers_sdk_tests
|
|
PRIVATE
|
|
${_fb_include_dirs}
|
|
)
|
|
|
|
target_link_libraries(
|
|
hipdnn_flatbuffers_sdk_tests
|
|
PRIVATE
|
|
GTest::gtest
|
|
GTest::gmock
|
|
Threads::Threads
|
|
hipdnn_flatbuffers_sdk
|
|
hipdnn_test_sdk
|
|
flatbuffers::flatbuffers
|
|
hip::host
|
|
${CMAKE_DL_LIBS}
|
|
)
|
|
|
|
clang_tidy_check(hipdnn_flatbuffers_sdk_tests)
|
|
|
|
# clang-tidy's CXX_CLANG_TIDY does not receive the HIP extra-args that batch
|
|
# run-clang-tidy gets (e.g. -isystem /opt/rocm/include). Flatbuffers headers
|
|
# live under that path, so we add them here so clang-tidy can resolve them.
|
|
if(ENABLE_CLANG_TIDY AND _fb_include_dirs)
|
|
get_target_property(_tidy_cmd hipdnn_flatbuffers_sdk_tests CXX_CLANG_TIDY)
|
|
if(_tidy_cmd)
|
|
foreach(_include IN LISTS _fb_include_dirs)
|
|
list(APPEND _tidy_cmd "-extra-arg=-isystem" "-extra-arg=${_include}")
|
|
endforeach()
|
|
set_target_properties(hipdnn_flatbuffers_sdk_tests PROPERTIES CXX_CLANG_TIDY "${_tidy_cmd}")
|
|
endif()
|
|
endif()
|
|
|
|
add_hipdnn_test(hipdnn_flatbuffers_sdk_tests ${CMAKE_CURRENT_BINARY_DIR})
|