2021-07-01 18:54:54 +05:30
|
|
|
# Common Tests - Test independent of all platforms
|
|
|
|
|
set(TEST_SRC
|
|
|
|
|
hipChooseDevice.cc
|
|
|
|
|
hipDeviceComputeCapability.cc
|
|
|
|
|
hipDeviceGetByPCIBusId.cc
|
2023-12-15 16:05:13 +05:30
|
|
|
hipDeviceGetLimit_old.cc
|
2021-07-01 18:54:54 +05:30
|
|
|
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
|
2024-01-04 13:45:01 -05:00
|
|
|
hipDeviceAPUCheck.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
|
2023-12-15 16:05:13 +05:30
|
|
|
hipDeviceSetLimit_old.cc
|
|
|
|
|
hipDeviceSetGetLimit.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
|
|
|
)
|
|
|
|
|
|
2024-07-12 11:43:33 +01:00
|
|
|
if(HIP_PLATFORM MATCHES "amd" AND BUILD_SHARED_LIBS)
|
2024-03-22 19:17:37 +05:30
|
|
|
set(AMD_SRC
|
|
|
|
|
hipGetProcAddressDevMgmt.cc)
|
2024-07-12 20:55:55 +05:30
|
|
|
if(UNIX)
|
|
|
|
|
set(AMD_SRC ${AMD_SRC} hipGetProcAddressIpcApis.cc)
|
|
|
|
|
endif()
|
2024-03-22 19:17:37 +05:30
|
|
|
set(TEST_SRC ${TEST_SRC} ${AMD_SRC})
|
|
|
|
|
endif()
|
|
|
|
|
|
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)
|
2023-11-28 17:39:05 +00:00
|
|
|
set_source_files_properties(hipDeviceGetUuid.cc PROPERTIES COMPILE_FLAGS -std=c++17)
|
2022-07-11 10:32:51 +01:00
|
|
|
|
|
|
|
|
add_executable(getDeviceCount EXCLUDE_FROM_ALL getDeviceCount_exe.cc)
|
2024-10-23 16:14:59 -07:00
|
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_EXE_TARGETS getDeviceCount)
|
2022-07-11 10:32:51 +01:00
|
|
|
|
2024-05-16 22:24:39 +05:30
|
|
|
add_executable(chkUUIDFrmChildProc_Exe EXCLUDE_FROM_ALL chkUUIDFrmChildProc_Exe.cc)
|
|
|
|
|
add_executable(chkUUIDInGrandChild_Exe EXCLUDE_FROM_ALL chkUUIDInGrandChild_Exe.cc)
|
|
|
|
|
add_executable(setuuidGetDevCount EXCLUDE_FROM_ALL setuuidGetDevCount_Exe.cc)
|
2024-11-22 11:02:23 +00:00
|
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_EXE_TARGETS
|
|
|
|
|
chkUUIDFrmChildProc_Exe
|
|
|
|
|
chkUUIDInGrandChild_Exe
|
|
|
|
|
setuuidGetDevCount)
|
|
|
|
|
|
2024-05-16 22:24:39 +05:30
|
|
|
if(UNIX)
|
|
|
|
|
add_executable(getUUIDfrmRocinfo EXCLUDE_FROM_ALL getUUIDfrmRocinfo_Exe.cc)
|
2024-11-22 11:02:23 +00:00
|
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_EXE_TARGETS getUUIDfrmRocinfo)
|
2024-05-16 22:24:39 +05:30
|
|
|
add_dependencies(build_tests getUUIDfrmRocinfo)
|
|
|
|
|
endif()
|
|
|
|
|
add_executable(multipleUUID EXCLUDE_FROM_ALL multipleUUID_Exe.cc)
|
|
|
|
|
add_executable(setEnvInChildProc EXCLUDE_FROM_ALL setEnvInChildProc_Exe.cc)
|
|
|
|
|
add_executable(uuidList EXCLUDE_FROM_ALL uuidList.cc)
|
2024-11-22 11:02:23 +00:00
|
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_EXE_TARGETS
|
|
|
|
|
multipleUUID
|
|
|
|
|
setEnvInChildProc
|
|
|
|
|
uuidList)
|
2024-05-16 22:24:39 +05:30
|
|
|
#Disabled below two executable due to the defect ticket SWDEV-467665
|
|
|
|
|
if(0)
|
|
|
|
|
add_executable(passUUIDToGrandChild_Exe EXCLUDE_FROM_ALL passUUIDToGrandChild_Exe.cc)
|
|
|
|
|
add_executable(ResetUUIDInChild_Exe EXCLUDE_FROM_ALL ResetUUIDInChild_Exe.cc)
|
2024-11-22 11:02:23 +00:00
|
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_EXE_TARGETS
|
|
|
|
|
passUUIDToGrandChild_Exe
|
|
|
|
|
ResetUUIDInChild_Exe)
|
2024-05-16 22:24:39 +05:30
|
|
|
endif()
|
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
|
2023-09-25 22:27:26 -04:00
|
|
|
COMPILE_OPTIONS -std=c++17)
|
2024-05-16 22:24:39 +05:30
|
|
|
add_dependencies(build_tests getDeviceCount chkUUIDFrmChildProc_Exe chkUUIDInGrandChild_Exe setuuidGetDevCount multipleUUID setEnvInChildProc uuidList)
|
|
|
|
|
#Disabled below two executable due to the defect ticket SWDEV-467665
|
|
|
|
|
if(0)
|
|
|
|
|
add_dependencies(build_tests passUUIDToGrandChild_Exe ResetUUIDInChild_Exe)
|
|
|
|
|
endif()
|
2025-06-10 21:25:06 +05:30
|
|
|
|
|
|
|
|
if(HIP_PLATFORM MATCHES "amd")
|
|
|
|
|
add_executable(hipDeviceSetGetScratchExe EXCLUDE_FROM_ALL hipDeviceSetGetScratchExe.cc)
|
|
|
|
|
add_dependencies(DeviceTest hipDeviceSetGetScratchExe)
|
|
|
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_EXE_TARGETS hipDeviceSetGetScratchExe)
|
|
|
|
|
endif()
|