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
57 lines
1.9 KiB
CMake
57 lines
1.9 KiB
CMake
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
add_compile_definitions(__HIP_PLATFORM_AMD__)
|
|
find_package(hiprtc REQUIRED)
|
|
find_package(hip REQUIRED)
|
|
|
|
add_subdirectory(kernels)
|
|
|
|
# Join with pipe separator so VERBATIM can pass the value through the shell
|
|
# without semicolons being misinterpreted.
|
|
list(JOIN GPU_REF_KERNEL_FILES "|" GPU_REF_KERNEL_FILES_PIPE)
|
|
|
|
# Generate embedded kernel sources at build time
|
|
add_custom_command(
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kernels/GpuRefKernelSources.cpp
|
|
${CMAKE_CURRENT_BINARY_DIR}/kernels/GpuRefKernelSources.hpp
|
|
COMMAND ${CMAKE_COMMAND}
|
|
"-DKERNEL_FILES=${GPU_REF_KERNEL_FILES_PIPE}"
|
|
"-DTEMPLATE_DIR=${GPU_REF_KERNEL_TEMPLATE_DIR}"
|
|
"-DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR}/kernels"
|
|
-P "${GPU_REF_KERNEL_EMBED_SCRIPT}"
|
|
DEPENDS ${GPU_REF_KERNEL_FILES}
|
|
${GPU_REF_KERNEL_TEMPLATE_DIR}/GpuRefKernelSources.hpp.in
|
|
${GPU_REF_KERNEL_TEMPLATE_DIR}/GpuRefKernelSources.cpp.in
|
|
${GPU_REF_KERNEL_EMBED_SCRIPT}
|
|
COMMENT "Embedding GPU reference kernel sources"
|
|
VERBATIM
|
|
)
|
|
|
|
add_library(
|
|
hipdnn_gpu_ref STATIC
|
|
src/GpuFpReferenceConvolution.cpp
|
|
src/GpuFpReferenceRMSNorm.cpp
|
|
src/GpuFpReferenceValidation.cpp
|
|
src/GpuIntReferenceValidation.cpp
|
|
src/GpuReferenceValidationFactory.cpp
|
|
src/GpuRefKernelCompiler.cpp
|
|
src/GpuRefValidatorHelpers.cpp
|
|
${CMAKE_CURRENT_BINARY_DIR}/kernels/GpuRefKernelSources.cpp
|
|
)
|
|
|
|
target_include_directories(
|
|
hipdnn_gpu_ref
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/kernels/types>
|
|
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/kernels
|
|
)
|
|
|
|
target_link_libraries(
|
|
hipdnn_gpu_ref
|
|
PUBLIC hipdnn_test_sdk
|
|
PRIVATE hiprtc::hiprtc hip::host
|
|
)
|
|
|
|
target_compile_options(hipdnn_gpu_ref PRIVATE ${INTEGRATION_TESTS_WARNING_COMPILE_OPTIONS})
|