Files
rocm-systems/catch/unit/rtc/CMakeLists.txt
T
Sameer Sahasrabuddhe 53f0a9bd01 SWDEV-453422: introduce warp sync tests
The following builtins are tested:

  - __all_sync, __any_sync, __ballot_sync and __activemask
  - __match_any_sync and __match_all_sync
  - __shfl_sync, __shfl_up_sync, __shfl_down_sync, and __shfl_xor_sync

The tests for shfl (all variants) were manually validated on a CUDA setup.

NOTE:

  - Unit_hipVoteSync_All temporarily disabled on Windows (SWDEV-452308).
  - All new tests temporarily disabled on CUDA (SWDEV-453145).

Change-Id: I84b205a88aa24219d199c760793e2f19f0cf8f13
2024-05-03 08:58:23 -04:00

64 lines
1.7 KiB
CMake

# 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
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
)
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)
if(UNIX)
set(AMD_TEST_SRC ${AMD_TEST_SRC}
RtcFunctions.cpp
RtcUtility.cpp)
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)
endif()
add_executable(ChkPtrdiff_t_Exe EXCLUDE_FROM_ALL ChkPtrdiff_t_Exe.cc)
if(HIP_PLATFORM MATCHES "nvidia")
target_link_libraries(ChkPtrdiff_t_Exe nvrtc)
elseif(HIP_PLATFORM MATCHES "amd")
target_link_libraries(ChkPtrdiff_t_Exe hiprtc)
endif()
add_dependencies(build_tests copyRtcHeaders ChkPtrdiff_t_Exe)