f85b731a5c
- Recreation of github PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/217 - For Unit_hipGetDeviceAttribute_CheckFineGrainSupport test, get segment information using HSA APIs instead of rocminfo Change-Id: I20f4c8a6669684a2326a3ce61735c4fa10433f9d
58 라인
1.7 KiB
CMake
58 라인
1.7 KiB
CMake
# 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
|
|
hipGetSetDeviceFlags.cc
|
|
hipSetGetDevice.cc
|
|
hipDeviceGetUuid.cc
|
|
hipDeviceGetDefaultMemPool.cc
|
|
hipDeviceCanAccessPeer.cc
|
|
hipDeviceEnableDisablePeerAccess.cc
|
|
hipExtGetLinkTypeAndHopCount.cc
|
|
hipDeviceSetLimit.cc
|
|
hipDeviceSetGetSharedMemConfig.cc
|
|
hipDeviceReset.cc
|
|
hipDeviceSetGetMemPool.cc
|
|
hipInit.cc
|
|
hipDriverGetVersion.cc
|
|
)
|
|
|
|
if(UNIX)
|
|
set(TEST_SRC ${TEST_SRC}
|
|
hipIpcOpenMemHandle.cc
|
|
hipIpcGetMemHandle.cc
|
|
hipIpcCloseMemHandle.cc
|
|
)
|
|
endif()
|
|
|
|
set_source_files_properties(hipGetDeviceCount.cc PROPERTIES COMPILE_FLAGS -std=c++17)
|
|
set_source_files_properties(hipDeviceGetUuid.cc PROPERTIES COMPILE_FLAGS -std=c++17)
|
|
|
|
add_executable(getDeviceCount EXCLUDE_FROM_ALL getDeviceCount_exe.cc)
|
|
|
|
hip_add_exe_to_target(NAME DeviceTest
|
|
TEST_SRC ${TEST_SRC}
|
|
TEST_TARGET_NAME build_tests
|
|
COMPILE_OPTIONS -std=c++17)
|
|
# Add hsa-runtime dependencies for Unit_hipGetDeviceAttribute_CheckFineGrainSupport
|
|
if(UNIX)
|
|
if(HIP_PLATFORM STREQUAL "amd")
|
|
target_include_directories(DeviceTest PRIVATE ${ROCM_PATH}/include)
|
|
target_link_libraries(DeviceTest hsa-runtime64)
|
|
target_link_directories(DeviceTest PRIVATE ${ROCM_PATH}/lib)
|
|
endif()
|
|
endif()
|
|
|
|
add_dependencies(build_tests getDeviceCount)
|