2021-07-01 18:54:54 +05:30
|
|
|
# Common Tests - Test independent of all platforms
|
|
|
|
|
set(TEST_SRC
|
|
|
|
|
hipChooseDevice.cc
|
|
|
|
|
hipDeviceComputeCapability.cc
|
|
|
|
|
hipDeviceGetByPCIBusId.cc
|
|
|
|
|
hipDeviceGetLimit.cc
|
|
|
|
|
hipDeviceGetName.cc
|
|
|
|
|
hipDeviceGetPCIBusId.cc
|
|
|
|
|
hipDeviceSetGetCacheConfig.cc
|
|
|
|
|
hipDeviceSynchronize.cc
|
|
|
|
|
hipDeviceTotalMem.cc
|
|
|
|
|
hipGetDeviceAttribute.cc
|
|
|
|
|
hipGetDeviceCount.cc
|
|
|
|
|
hipGetDeviceProperties.cc
|
|
|
|
|
hipRuntimeGetVersion.cc
|
2022-06-28 04:31:55 +01:00
|
|
|
hipGetSetDeviceFlags.cc
|
2021-07-01 18:54:54 +05:30
|
|
|
hipSetGetDevice.cc
|
2022-06-10 21:17:10 +05:30
|
|
|
hipDeviceGetUuid.cc
|
2022-08-03 12:19:49 +01:00
|
|
|
hipDeviceGetP2PAttribute.cc
|
2022-11-02 14:55:37 +01:00
|
|
|
hipDeviceGetDefaultMemPool.cc
|
2022-11-04 04:13:33 +01:00
|
|
|
hipDeviceCanAccessPeer.cc
|
|
|
|
|
hipDeviceEnableDisablePeerAccess.cc
|
2022-09-19 07:58:35 +02:00
|
|
|
hipExtGetLinkTypeAndHopCount.cc
|
2022-09-26 19:49:00 +05:30
|
|
|
hipDeviceSetLimit.cc
|
2022-11-07 09:31:36 +01:00
|
|
|
hipDeviceSetGetSharedMemConfig.cc
|
2022-12-01 05:37:20 +01:00
|
|
|
hipDeviceReset.cc
|
2022-11-03 05:46:24 +01:00
|
|
|
hipDeviceSetGetMemPool.cc
|
2022-11-14 10:35:14 +01:00
|
|
|
hipInit.cc
|
|
|
|
|
hipDriverGetVersion.cc
|
2021-07-01 18:54:54 +05:30
|
|
|
)
|
|
|
|
|
|
2022-11-04 14:56:53 +01:00
|
|
|
if(UNIX)
|
|
|
|
|
set(TEST_SRC ${TEST_SRC}
|
2022-11-07 12:20:44 +01:00
|
|
|
hipIpcOpenMemHandle.cc
|
2022-11-07 09:31:10 +01:00
|
|
|
hipIpcGetMemHandle.cc
|
|
|
|
|
hipIpcCloseMemHandle.cc
|
|
|
|
|
)
|
2022-11-04 14:56:53 +01:00
|
|
|
endif()
|
|
|
|
|
|
2022-07-11 10:32:51 +01:00
|
|
|
set_source_files_properties(hipGetDeviceCount.cc PROPERTIES COMPILE_FLAGS -std=c++17)
|
2022-08-03 12:19:49 +01:00
|
|
|
set_source_files_properties(hipDeviceGetP2PAttribute.cc PROPERTIES COMPILE_FLAGS -std=c++17)
|
2022-07-11 10:32:51 +01:00
|
|
|
|
|
|
|
|
add_executable(getDeviceCount EXCLUDE_FROM_ALL getDeviceCount_exe.cc)
|
2023-01-19 14:09:14 -08:00
|
|
|
add_executable(hipDeviceGetP2PAttribute_exe EXCLUDE_FROM_ALL hipDeviceGetP2PAttribute_exe.cc)
|
2022-07-11 10:32:51 +01:00
|
|
|
|
2021-11-25 21:32:29 -08:00
|
|
|
hip_add_exe_to_target(NAME DeviceTest
|
|
|
|
|
TEST_SRC ${TEST_SRC}
|
2022-06-28 04:31:55 +01:00
|
|
|
TEST_TARGET_NAME build_tests
|
|
|
|
|
COMPILE_OPTIONS -std=c++14)
|
2022-07-11 10:32:51 +01:00
|
|
|
|
2023-01-19 14:09:14 -08:00
|
|
|
add_dependencies(build_tests getDeviceCount)
|
|
|
|
|
add_dependencies(build_tests hipDeviceGetP2PAttribute_exe)
|