EXSWHTEC-289 - Implement tests for remainder and rounding device math functions #234

Change-Id: I8413cfeb0cbf32e2e8369c5b1527c9794a595688
This commit is contained in:
Dino Music
2024-01-22 20:09:00 +05:30
committed by Rakesh Roy
parent 34b25ab7ac
commit 111497351d
8 changed files with 616 additions and 61 deletions
+3 -57
View File
@@ -83,17 +83,7 @@ if(HIP_PLATFORM MATCHES "amd")
hipExtMallocWithFlags.cc
hipMallocMngdMultiThread.cc
hipArray.cc
hipMemVmm.cc
hipMemCreate.cc
hipMemMap.cc
hipMemGetAllocationGranularity.cc
hipMemSetGetAccess.cc
hipMemRetainAllocationHandle.cc
hipMemUnmap.cc
hipMemAddressFree.cc
hipMemAddressReserve.cc
hipMemRelease.cc
hipMemGetAllocationPropertiesFromHandle.cc)
hipMemVmm.cc)
else()
set(TEST_SRC ${TEST_SRC} hipGetSymbolSizeAddress.cc)
endif()
@@ -138,8 +128,10 @@ set(TEST_SRC
hipMemsetFunctional.cc
hipMalloc.cc
hipMallocPitch.cc
hipMallocArray.cc
hipMalloc3D.cc
hipMalloc3DArray.cc
hipArrayCreate.cc
hipArray3DCreate.cc
hipDrvMemcpy3D.cc
hipDrvMemcpy3D_old.cc
@@ -165,52 +157,6 @@ set(TEST_SRC
hipMallocMipmappedArray.cc
hipFreeMipmappedArray.cc)
set(NOT_FOR_MI200_AND_ABOVE_TEST hipMallocArray.cc hipArrayCreate.cc) # tests not for MI200+
set(MI200_AND_ABOVE_TARGETS gfx90a gfx940 gfx941 gfx942)
function(CheckRejectedArchs OFFLOAD_ARCH_STR_LOCAL)
set(ARCH_CHECK -1 PARENT_SCOPE)
string(REGEX MATCHALL "--offload-arch=gfx[0-9a-z]+" OFFLOAD_ARCH_LIST ${OFFLOAD_ARCH_STR_LOCAL})
foreach(OFFLOAD_ARCH IN LISTS OFFLOAD_ARCH_LIST)
string(REGEX MATCHALL "--offload-arch=(gfx[0-9a-z]+)" matches ${OFFLOAD_ARCH})
if (CMAKE_MATCH_COUNT EQUAL 1)
if (CMAKE_MATCH_1 IN_LIST MI200_AND_ABOVE_TARGETS)
set(ARCH_CHECK 1 PARENT_SCOPE)
endif() # CMAKE_MATCH_1
endif() # CMAKE_MATCH_COUNT
endforeach() # OFFLOAD_ARCH_LIST
endfunction() # CheckAcceptedArchs
if(HIP_PLATFORM MATCHES "amd")
if (DEFINED OFFLOAD_ARCH_STR)
CheckRejectedArchs(${OFFLOAD_ARCH_STR})
elseif(DEFINED $ENV{HCC_AMDGPU_TARGET})
CheckRejectedArchs($ENV{HCC_AMDGPU_TARGET})
else()
set(ARCH_CHECK -1)
endif()
if(${ARCH_CHECK} EQUAL -1)
message(STATUS "Adding test: ${NOT_FOR_MI200_AND_ABOVE_TEST}")
set(TEST_SRC ${TEST_SRC} ${NOT_FOR_MI200_AND_ABOVE_TEST})
endif()
else()
set(TEST_SRC ${TEST_SRC} ${NOT_FOR_MI200_AND_ABOVE_TEST})
endif()
hip_add_exe_to_target(NAME MemoryTest2
TEST_SRC ${TEST_SRC}
TEST_TARGET_NAME build_tests COMMON_SHARED_SRC ${COMMON_SHARED_SRC})
if(HIP_PLATFORM MATCHES "amd")
set(TEST_SRC
hipSVMTestByteGranularity.cpp
hipSVMTestFineGrainMemoryConsistency.cpp
hipSVMTestFineGrainSyncBuffers.cpp
hipSVMTestSharedAddressSpaceFineGrain.cpp
)
hip_add_exe_to_target(NAME SVMAtomicTest
TEST_SRC ${TEST_SRC}
TEST_TARGET_NAME build_tests COMMON_SHARED_SRC ${COMMON_SHARED_SRC})
add_dependencies(build_tests hipHostRegisterPerf)
endif()