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
67 lines
2.6 KiB
CMake
67 lines
2.6 KiB
CMake
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
@PACKAGE_INIT@
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency(hipdnn_data_sdk @HIPDNN_FLATBUFFERS_SDK_DATA_SDK_MIN_VERSION@ CONFIG REQUIRED)
|
|
|
|
find_dependency(flatbuffers REQUIRED)
|
|
|
|
# Validate the consumer's FlatBuffers matches the version hipDNN was built
|
|
# against. The imported target's compile definitions and any inline
|
|
# FlatBuffers code are baked against this version, so a mismatch is unsafe.
|
|
# Comparison + messaging are shared with the build-time guard in
|
|
# flatbuffers_sdk/CMakeLists.txt via this helper module.
|
|
include("${CMAKE_CURRENT_LIST_DIR}/hipdnn_flatbuffers_version_check.cmake")
|
|
hipdnn_check_flatbuffers_version(
|
|
EXPECTED "@HIPDNN_FLATBUFFERS_VERSION@"
|
|
CONTEXT "hipDNN Flatbuffers SDK"
|
|
)
|
|
|
|
# Reflects how hipDNN was built; not consumer-overridable, since the imported
|
|
# target's compile definitions are already baked in.
|
|
set(HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB @HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB@)
|
|
|
|
# nlohmann_json is optional based on HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB
|
|
if(NOT HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB)
|
|
find_dependency(nlohmann_json REQUIRED)
|
|
endif()
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/hipdnn_flatbuffers_sdkTargets.cmake")
|
|
|
|
message(STATUS "hipDNN Flatbuffers SDK: Using imported FlatBuffers ${flatbuffers_VERSION} headers")
|
|
|
|
function(hipdnn_add_dependency_includes TARGET_NAME HEADER_LIB_TARGET_NAME)
|
|
set(options "")
|
|
set(oneValueArgs "")
|
|
set(multiValueArgs COMPILE_DEFINITIONS)
|
|
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
|
|
|
if(NOT TARGET ${TARGET_NAME})
|
|
message(FATAL_ERROR "hipdnn_add_dependency_includes: Target '${TARGET_NAME}' does not exist")
|
|
return()
|
|
endif()
|
|
|
|
if(NOT TARGET ${HEADER_LIB_TARGET_NAME})
|
|
message(FATAL_ERROR "hipdnn_add_dependency_includes: Header library target '${HEADER_LIB_TARGET_NAME}' does not exist")
|
|
return()
|
|
endif()
|
|
|
|
get_target_property(_dep_includes ${HEADER_LIB_TARGET_NAME} INTERFACE_INCLUDE_DIRECTORIES)
|
|
if(_dep_includes)
|
|
message(VERBOSE "${TARGET_NAME} adding includes from ${HEADER_LIB_TARGET_NAME}: ${_dep_includes}")
|
|
target_include_directories(${TARGET_NAME} SYSTEM INTERFACE ${_dep_includes})
|
|
endif()
|
|
|
|
if(ARG_COMPILE_DEFINITIONS)
|
|
target_compile_definitions(${TARGET_NAME} INTERFACE ${ARG_COMPILE_DEFINITIONS})
|
|
endif()
|
|
endfunction()
|
|
|
|
hipdnn_add_dependency_includes(hipdnn_flatbuffers_sdk flatbuffers::flatbuffers)
|
|
if(NOT HIPDNN_FLATBUFFERS_SDK_SKIP_JSON_LIB)
|
|
hipdnn_add_dependency_includes(hipdnn_flatbuffers_sdk nlohmann_json::nlohmann_json)
|
|
endif()
|