2021-04-08 14:09:19 +05:30
|
|
|
# Common Tests - Test independent of all platforms
|
|
|
|
|
set(TEST_SRC
|
|
|
|
|
floatMath.cc
|
2021-06-15 18:07:58 +05:30
|
|
|
anyAll.cc
|
|
|
|
|
ballot.cc
|
|
|
|
|
clz.cc
|
|
|
|
|
ffs.cc
|
|
|
|
|
funnelshift.cc
|
|
|
|
|
brev.cc
|
2021-06-24 14:15:27 +05:30
|
|
|
popc.cc
|
|
|
|
|
ldg.cc
|
|
|
|
|
syncthreadsand.cc
|
|
|
|
|
syncthreadscount.cc
|
|
|
|
|
syncthreadsor.cc
|
|
|
|
|
threadfence_system.cc
|
2021-05-21 02:31:28 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# AMD only tests
|
|
|
|
|
set(AMD_TEST_SRC
|
2021-09-06 12:21:38 +05:30
|
|
|
unsafeAtomicAdd.cc
|
2021-04-08 14:09:19 +05:30
|
|
|
vectorTypesDevice.cc
|
2021-06-24 14:15:27 +05:30
|
|
|
mbcnt.cc
|
2021-06-15 18:07:58 +05:30
|
|
|
bitExtract.cc
|
|
|
|
|
bitInsert.cc
|
|
|
|
|
floatTM.cc
|
2021-04-08 14:09:19 +05:30
|
|
|
)
|
|
|
|
|
|
2021-05-21 02:31:28 -07:00
|
|
|
if(HIP_PLATFORM MATCHES "amd")
|
|
|
|
|
set(TEST_SRC ${TEST_SRC} ${AMD_TEST_SRC})
|
2021-06-15 18:07:58 +05:30
|
|
|
set_source_files_properties(floatTM.cc PROPERTIES COMPILE_FLAGS -std=c++17)
|
2021-05-21 02:31:28 -07:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
2021-04-08 14:09:19 +05:30
|
|
|
# Create shared lib of all tests
|
2021-06-15 18:07:58 +05:30
|
|
|
add_library(UnitDeviceTests SHARED EXCLUDE_FROM_ALL ${TEST_SRC})
|
|
|
|
|
|
|
|
|
|
if(HIP_PLATFORM MATCHES "nvidia")
|
|
|
|
|
target_compile_options(UnitDeviceTests PUBLIC --Wno-deprecated-declarations)
|
|
|
|
|
endif()
|
2021-04-08 14:09:19 +05:30
|
|
|
|
|
|
|
|
# Add dependency on build_tests to build it on this custom target
|
2021-06-15 18:07:58 +05:30
|
|
|
add_dependencies(build_tests UnitDeviceTests)
|