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
104 lines
3.1 KiB
CMake
104 lines
3.1 KiB
CMake
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# Common Tests - Test independent of all platforms
|
|
set(TEST_SRC
|
|
saxpy.cc
|
|
warpsize.cc
|
|
hipRtcFunctional.cc
|
|
hipStreamCaptureRtc.cc
|
|
includepath.cc
|
|
hipRTCDeviceMalloc.cc
|
|
hiprtcGetLoweredName.cc
|
|
)
|
|
|
|
# AMD only tests
|
|
set(AMD_TEST_SRC
|
|
customOptions.cc
|
|
hipRtcBfloat16.cc
|
|
linker.cc
|
|
shfl.cc
|
|
shfl_sync.cc
|
|
rtc_reduce.cc
|
|
rtc_coop.cc
|
|
stdheaders.cc
|
|
hiprtc_MathConstants_HeaderTst.cc
|
|
hiprtc_VectorTypes_HeaderTst.cc
|
|
hiprtc_MathFunctions_HeaderTst.cc
|
|
hiprtc_fp16_HeaderTst.cc
|
|
hiprtc_TextureTypes_HeaderTst.cc
|
|
hipRtcComplexHeader.cc
|
|
hipRtcPtrdiff_t.cc
|
|
hiprtc_Bitcode_UndefinedFn.cc
|
|
hiprtc_bfloat16_HeaderTst.cc
|
|
hiprtc_fp8.cc
|
|
hipRtcSpirvCompilation.cc
|
|
)
|
|
|
|
if(UNIX)
|
|
list(APPEND AMD_TEST_SRC bitcodebundle/bitcodebundle.cc)
|
|
endif()
|
|
|
|
if(HIP_PLATFORM MATCHES "amd" AND UNIX)
|
|
add_subdirectory(bitcodebundle)
|
|
endif()
|
|
|
|
add_custom_target(copyRtcHeaders ALL
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
${CMAKE_CURRENT_SOURCE_DIR}/saxpy.h
|
|
${CMAKE_CURRENT_BINARY_DIR}/saxpy.h
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
${CMAKE_CURRENT_SOURCE_DIR}/headers
|
|
${CMAKE_CURRENT_BINARY_DIR}/headers)
|
|
|
|
add_custom_target(copyTstJson ALL
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
${CMAKE_CURRENT_SOURCE_DIR}/RtcConfig.json
|
|
${CMAKE_CURRENT_BINARY_DIR}/RtcConfig.json)
|
|
|
|
file(GLOB INSTALL_HEADER_FILES "./headers/*")
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_HEADER_FILES ${INSTALL_HEADER_FILES})
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_CUSTOM_TARGETS ${CMAKE_CURRENT_BINARY_DIR}/saxpy.h)
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_CUSTOM_TARGETS ${CMAKE_CURRENT_BINARY_DIR}/RtcConfig.json)
|
|
if(HIP_PLATFORM MATCHES "amd" AND UNIX)
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_CUSTOM_TARGETS ${CMAKE_CURRENT_BINARY_DIR}/offload_bundle.hipfb)
|
|
endif()
|
|
|
|
if(UNIX)
|
|
set(AMD_TEST_SRC ${AMD_TEST_SRC}
|
|
RtcFunctions.cpp
|
|
RtcUtility.cpp
|
|
hiprtcComplrOptnTesting.cc)
|
|
endif()
|
|
|
|
if(HIP_PLATFORM MATCHES "nvidia")
|
|
hip_add_exe_to_target(NAME RTC
|
|
TEST_SRC ${TEST_SRC}
|
|
TEST_TARGET_NAME build_tests
|
|
LINKER_LIBS nvrtc)
|
|
elseif(HIP_PLATFORM MATCHES "amd")
|
|
set(TEST_SRC ${TEST_SRC} ${AMD_TEST_SRC})
|
|
hip_add_exe_to_target(NAME RTC
|
|
TEST_SRC ${TEST_SRC}
|
|
TEST_TARGET_NAME build_tests
|
|
LINKER_LIBS hiprtc::hiprtc)
|
|
endif()
|
|
|
|
set_source_files_properties(ChkPtrdiff_t_Exe.cc PROPERTIES LANGUAGE ${GPGPU_LANGUAGE})
|
|
add_executable(ChkPtrdiff_t_Exe EXCLUDE_FROM_ALL ChkPtrdiff_t_Exe.cc)
|
|
target_link_libraries(ChkPtrdiff_t_Exe ${GPGPU_LINKER_LIBRARIES})
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_EXE_TARGETS ChkPtrdiff_t_Exe)
|
|
|
|
if(HIP_PLATFORM MATCHES "nvidia")
|
|
target_link_libraries(ChkPtrdiff_t_Exe nvrtc)
|
|
elseif(HIP_PLATFORM MATCHES "amd")
|
|
target_link_libraries(ChkPtrdiff_t_Exe hiprtc::hiprtc hip::host hip::device)
|
|
endif()
|
|
|
|
add_dependencies(RTC copyRtcHeaders copyTstJson ChkPtrdiff_t_Exe)
|
|
|
|
if(HIP_PLATFORM MATCHES "amd" AND UNIX)
|
|
add_dependencies(RTC bundle_bitcode)
|
|
endif()
|