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
86 lines
3.0 KiB
CMake
86 lines
3.0 KiB
CMake
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# AMD Tests
|
|
set(TEST_SRC
|
|
printfFlags.cc
|
|
printfLength.cc
|
|
printfSpecifiers.cc
|
|
printfFlagsNonHost.cc
|
|
printfSpecifiersNonHost.cc
|
|
printfHost.cc)
|
|
|
|
if(HIP_PLATFORM MATCHES "nvidia")
|
|
set(LINKER_LIBS nvrtc)
|
|
elseif(HIP_PLATFORM MATCHES "amd")
|
|
set(LINKER_LIBS hiprtc::hiprtc)
|
|
endif()
|
|
|
|
if(UNIX)
|
|
set(AMD_TEST_SRC
|
|
printfNonHost.cc
|
|
hipPrintfManyDevices.cc
|
|
hipPrintfStar.cc
|
|
hipPrintfManyWaves.cc
|
|
hipPrintfWidthPrecision.cc
|
|
hipPrintfBasic.cc
|
|
hipPrintfAltForms.cc)
|
|
endif()
|
|
|
|
if(HIP_PLATFORM MATCHES "amd")
|
|
set(TEST_SRC ${TEST_SRC} ${AMD_TEST_SRC})
|
|
endif()
|
|
|
|
if(HIP_PLATFORM MATCHES "amd")
|
|
set_source_files_properties(printfFlagsNonHost.cc PROPERTIES COMPILE_OPTIONS "-mprintf-kind=buffered")
|
|
set_source_files_properties(printfSpecifiersNonHost.cc PROPERTIES COMPILE_OPTIONS "-mprintf-kind=buffered")
|
|
set_source_files_properties(printfNonHost.cc PROPERTIES COMPILE_OPTIONS "-mprintf-kind=buffered")
|
|
endif()
|
|
|
|
hip_add_exe_to_target(NAME PrintfTest
|
|
TEST_SRC ${TEST_SRC}
|
|
TEST_TARGET_NAME build_tests
|
|
LINKER_LIBS ${LINKER_LIBS}
|
|
PROPERTY CXX_STANDARD 17)
|
|
|
|
if(UNIX)
|
|
file(GLOB NEGATIVE_TEST_SRC
|
|
printf_negative_kernels.cc)
|
|
|
|
file(COPY ${NEGATIVE_TEST_SRC} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_SRC_FILES ${NEGATIVE_TEST_SRC})
|
|
|
|
#add_test(NAME Unit_Printf_Negative
|
|
# COMMAND ${Python3_EXECUTABLE} ../compileAndCaptureOutput.py
|
|
# ./src ${HIP_PLATFORM} ${HIP_PATH}
|
|
# printf_negative_kernels.cc 11)
|
|
endif()
|
|
|
|
# Standalone exes
|
|
add_executable(printfFlags_exe EXCLUDE_FROM_ALL printfFlags_exe.cc)
|
|
add_executable(printfLength_exe EXCLUDE_FROM_ALL printfLength_exe.cc)
|
|
add_executable(printfSpecifiers_exe EXCLUDE_FROM_ALL printfSpecifiers_exe.cc)
|
|
add_executable(printfFlagsNonHost_exe EXCLUDE_FROM_ALL printfFlagsNonHost_exe.cc)
|
|
add_executable(printfSpecifiersNonHost_exe EXCLUDE_FROM_ALL printfSpecifiersNonHost_exe.cc)
|
|
|
|
set_source_files_properties(printfFlags_exe.cc PROPERTIES LANGUAGE ${GPGPU_LANGUAGE})
|
|
set_source_files_properties(printfLength_exe.cc PROPERTIES LANGUAGE ${GPGPU_LANGUAGE})
|
|
set_source_files_properties(printfSpecifiers_exe.cc PROPERTIES LANGUAGE ${GPGPU_LANGUAGE})
|
|
set_source_files_properties(printfFlagsNonHost_exe.cc PROPERTIES LANGUAGE ${GPGPU_LANGUAGE})
|
|
set_source_files_properties(printfSpecifiersNonHost_exe.cc PROPERTIES LANGUAGE ${GPGPU_LANGUAGE})
|
|
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_EXE_TARGETS
|
|
printfFlags_exe
|
|
printfLength_exe
|
|
printfSpecifiers_exe
|
|
printfFlagsNonHost_exe
|
|
printfSpecifiersNonHost_exe)
|
|
|
|
add_dependencies(build_tests printfFlags_exe)
|
|
add_dependencies(build_tests printfLength_exe)
|
|
add_dependencies(build_tests printfSpecifiers_exe)
|
|
add_dependencies(build_tests printfFlagsNonHost_exe)
|
|
add_dependencies(build_tests printfSpecifiersNonHost_exe)
|
|
|