2022-07-01 09:17:47 +01:00
|
|
|
# Copyright (c) 2022 Advanced Micro Devices, Inc. All Rights Reserved.
|
2022-02-25 19:39:13 +05:30
|
|
|
#
|
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
# furnished to do so, subject to the following conditions:
|
|
|
|
|
#
|
|
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
|
# all copies or substantial portions of the Software.
|
|
|
|
|
#
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
# THE SOFTWARE.
|
|
|
|
|
|
2021-04-08 14:09:19 +05:30
|
|
|
# Common Tests - Test independent of all platforms
|
2021-08-19 10:29:07 +05:30
|
|
|
if(HIP_PLATFORM MATCHES "amd")
|
2021-04-08 14:09:19 +05:30
|
|
|
set(TEST_SRC
|
2022-07-01 09:17:47 +01:00
|
|
|
DriverContext.cc
|
2021-04-08 14:09:19 +05:30
|
|
|
memset.cc
|
|
|
|
|
malloc.cc
|
2021-06-08 11:24:37 +05:30
|
|
|
hipMemcpy2DToArray.cc
|
|
|
|
|
hipMemcpy2DToArrayAsync.cc
|
2021-06-16 03:03:11 +05:30
|
|
|
hipMemcpy3D.cc
|
|
|
|
|
hipMemcpy3DAsync.cc
|
|
|
|
|
hipMemcpyParam2D.cc
|
|
|
|
|
hipMemcpyParam2DAsync.cc
|
2021-06-28 15:25:09 +05:30
|
|
|
hipMemcpy2D.cc
|
|
|
|
|
hipMemcpy2DAsync.cc
|
2021-06-29 00:39:18 +05:30
|
|
|
hipMemcpy2DFromArray.cc
|
|
|
|
|
hipMemcpy2DFromArrayAsync.cc
|
2021-06-28 15:55:07 +05:30
|
|
|
hipMemcpyAtoH.cc
|
|
|
|
|
hipMemcpyHtoA.cc
|
2021-07-06 23:48:24 +05:30
|
|
|
hipMemcpyAllApiNegative.cc
|
|
|
|
|
hipMemcpy_MultiThread.cc
|
2021-08-19 10:29:07 +05:30
|
|
|
hipHostRegister.cc
|
2022-07-01 10:41:35 +01:00
|
|
|
hipHostUnregister.cc
|
2022-07-01 09:54:17 +01:00
|
|
|
hipMallocPitch.cc
|
2021-08-19 10:29:07 +05:30
|
|
|
hipMemPtrGetInfo.cc
|
|
|
|
|
hipPointerGetAttributes.cc
|
|
|
|
|
hipHostGetFlags.cc
|
2022-06-10 16:46:54 +01:00
|
|
|
hipHostGetDevicePointer.cc
|
2021-08-19 10:29:07 +05:30
|
|
|
hipMallocManaged_MultiScenario.cc
|
2022-05-25 14:37:20 +01:00
|
|
|
hipMemsetNegative.cc
|
2021-09-17 11:37:05 +05:30
|
|
|
hipMemset.cc
|
|
|
|
|
hipMemsetAsyncMultiThread.cc
|
2021-09-17 11:54:39 +05:30
|
|
|
hipMemset3D.cc
|
|
|
|
|
hipMemset2D.cc
|
2021-09-17 12:11:26 +05:30
|
|
|
hipHostMallocTests.cc
|
|
|
|
|
hipMemset3DFunctional.cc
|
|
|
|
|
hipMemset3DRegressMultiThread.cc
|
2021-09-24 16:29:39 +05:30
|
|
|
hipMallocManagedFlagsTst.cc
|
2021-10-06 17:24:04 +05:30
|
|
|
hipMemPrefetchAsyncExtTsts.cc
|
2021-10-06 17:33:26 +05:30
|
|
|
hipMemAdviseMmap.cc
|
2021-11-25 15:11:10 +05:30
|
|
|
hipMemCoherencyTst.cc
|
2022-02-23 09:00:16 +05:30
|
|
|
hipMallocManaged.cc
|
|
|
|
|
hipMemRangeGetAttribute.cc
|
2022-02-25 19:39:13 +05:30
|
|
|
hipMemcpyFromSymbol.cc
|
2022-03-23 17:15:21 +05:30
|
|
|
hipPtrGetAttribute.cc
|
2022-06-13 19:26:48 +05:30
|
|
|
hipMemPoolApi.cc
|
2022-04-28 04:08:07 +05:30
|
|
|
hipMemcpyPeer.cc
|
|
|
|
|
hipMemcpyPeerAsync.cc
|
|
|
|
|
hipMemcpyWithStream.cc
|
|
|
|
|
hipMemcpyWithStreamMultiThread.cc
|
|
|
|
|
hipMemsetAsyncAndKernel.cc
|
|
|
|
|
hipMemset2DAsyncMultiThreadAndKernel.cc
|
|
|
|
|
hipMallocManaged.cc
|
|
|
|
|
hipMallocConcurrency.cc
|
|
|
|
|
hipMemcpyDtoD.cc
|
|
|
|
|
hipMemcpyDtoDAsync.cc
|
|
|
|
|
hipHostMalloc.cc
|
|
|
|
|
hipMemcpy.cc
|
|
|
|
|
hipMemcpyAsync.cc
|
2022-07-11 07:48:43 +01:00
|
|
|
hipMemsetFunctional.cc
|
2022-05-17 15:01:15 +05:30
|
|
|
hipMallocPitch.cc
|
|
|
|
|
hipMallocArray.cc
|
|
|
|
|
hipMalloc3D.cc
|
|
|
|
|
hipMalloc3DArray.cc
|
|
|
|
|
hipArrayCreate.cc
|
2022-07-11 11:41:32 +01:00
|
|
|
hipArray3DCreate.cc
|
2022-05-17 15:02:37 +05:30
|
|
|
hipDrvMemcpy3D.cc
|
|
|
|
|
hipDrvMemcpy3DAsync.cc
|
2022-05-17 16:00:33 +05:30
|
|
|
hipPointerGetAttribute.cc
|
|
|
|
|
hipDrvPtrGetAttributes.cc
|
2022-05-17 19:52:22 +05:30
|
|
|
hipMallocMngdMultiThread.cc
|
2022-05-17 19:54:28 +05:30
|
|
|
hipMemPrefetchAsync.cc
|
2022-06-28 23:42:45 +05:30
|
|
|
hipArray.cc
|
2022-07-08 13:36:27 +05:30
|
|
|
hipMemVmm.cc
|
2022-07-28 11:15:42 +01:00
|
|
|
hipMemGetInfo.cc
|
2022-08-04 06:05:21 +01:00
|
|
|
hipFree.cc
|
|
|
|
|
hipMemcpySync.cc
|
|
|
|
|
hipMemsetSync.cc
|
|
|
|
|
hipMemsetAsync.cc
|
2022-08-05 15:12:24 +05:30
|
|
|
hipMemAdvise.cc
|
2021-04-08 14:09:19 +05:30
|
|
|
)
|
2021-08-19 10:29:07 +05:30
|
|
|
else()
|
|
|
|
|
set(TEST_SRC
|
2022-07-01 09:17:47 +01:00
|
|
|
DriverContext.cc
|
2021-08-19 10:29:07 +05:30
|
|
|
memset.cc
|
|
|
|
|
malloc.cc
|
|
|
|
|
hipMemcpy2DToArray.cc
|
|
|
|
|
hipMemcpy2DToArrayAsync.cc
|
|
|
|
|
hipMemcpy3D.cc
|
|
|
|
|
hipMemcpy3DAsync.cc
|
|
|
|
|
hipMemcpyParam2D.cc
|
|
|
|
|
hipMemcpyParam2DAsync.cc
|
|
|
|
|
hipMemcpy2D.cc
|
|
|
|
|
hipMemcpy2DAsync.cc
|
|
|
|
|
hipMemcpy2DFromArray.cc
|
|
|
|
|
hipMemcpy2DFromArrayAsync.cc
|
|
|
|
|
hipMemcpyAtoH.cc
|
|
|
|
|
hipMemcpyHtoA.cc
|
|
|
|
|
hipMemcpyAllApiNegative.cc
|
|
|
|
|
hipMemcpy_MultiThread.cc
|
|
|
|
|
hipHostRegister.cc
|
2022-07-01 10:41:35 +01:00
|
|
|
hipHostUnregister.cc
|
2022-07-01 09:54:17 +01:00
|
|
|
hipMallocPitch.cc
|
2021-08-19 10:29:07 +05:30
|
|
|
hipHostGetFlags.cc
|
2022-06-10 16:46:54 +01:00
|
|
|
hipHostGetDevicePointer.cc
|
2021-08-19 10:29:07 +05:30
|
|
|
hipMallocManaged_MultiScenario.cc
|
2022-05-25 14:37:20 +01:00
|
|
|
hipMemsetNegative.cc
|
2021-09-17 11:37:05 +05:30
|
|
|
hipMemset.cc
|
|
|
|
|
hipMemsetAsyncMultiThread.cc
|
2021-09-17 11:54:39 +05:30
|
|
|
hipMemset3D.cc
|
|
|
|
|
hipMemset2D.cc
|
2021-09-17 12:11:26 +05:30
|
|
|
hipHostMallocTests.cc
|
|
|
|
|
hipMemset3DFunctional.cc
|
|
|
|
|
hipMemset3DRegressMultiThread.cc
|
2021-09-24 16:29:39 +05:30
|
|
|
hipMallocManagedFlagsTst.cc
|
2021-10-06 17:24:04 +05:30
|
|
|
hipMemPrefetchAsyncExtTsts.cc
|
2021-10-06 17:33:26 +05:30
|
|
|
hipMemAdviseMmap.cc
|
2022-02-23 09:00:16 +05:30
|
|
|
hipMallocManaged.cc
|
|
|
|
|
hipMemRangeGetAttribute.cc
|
2022-02-25 19:39:13 +05:30
|
|
|
hipMemcpyFromSymbol.cc
|
2022-03-23 17:15:21 +05:30
|
|
|
hipPtrGetAttribute.cc
|
2022-08-23 09:35:39 +05:30
|
|
|
hipMemPoolApi.cc
|
2022-04-28 04:08:07 +05:30
|
|
|
hipMemcpyPeer.cc
|
|
|
|
|
hipMemcpyPeerAsync.cc
|
|
|
|
|
hipMemcpyWithStream.cc
|
|
|
|
|
hipMemcpyWithStreamMultiThread.cc
|
|
|
|
|
hipMemsetAsyncAndKernel.cc
|
|
|
|
|
hipMemset2DAsyncMultiThreadAndKernel.cc
|
|
|
|
|
hipMallocManaged.cc
|
|
|
|
|
hipMallocConcurrency.cc
|
|
|
|
|
hipMemcpyDtoD.cc
|
|
|
|
|
hipMemcpyDtoDAsync.cc
|
|
|
|
|
hipHostMalloc.cc
|
|
|
|
|
hipMemcpy.cc
|
|
|
|
|
hipMemcpyAsync.cc
|
2022-07-11 07:48:43 +01:00
|
|
|
hipMemsetFunctional.cc
|
2022-05-17 15:01:15 +05:30
|
|
|
hipMallocPitch.cc
|
|
|
|
|
hipMallocArray.cc
|
|
|
|
|
hipMalloc3D.cc
|
|
|
|
|
hipMalloc3DArray.cc
|
|
|
|
|
hipArrayCreate.cc
|
2022-07-11 11:41:32 +01:00
|
|
|
hipArray3DCreate.cc
|
2022-05-17 15:02:37 +05:30
|
|
|
hipDrvMemcpy3D.cc
|
|
|
|
|
hipDrvMemcpy3DAsync.cc
|
2022-05-17 16:00:33 +05:30
|
|
|
hipPointerGetAttribute.cc
|
|
|
|
|
hipDrvPtrGetAttributes.cc
|
2022-05-17 19:54:28 +05:30
|
|
|
hipMemPrefetchAsync.cc
|
2022-07-28 11:15:42 +01:00
|
|
|
hipMemGetInfo.cc
|
2022-08-04 06:05:21 +01:00
|
|
|
hipFree.cc
|
|
|
|
|
hipMemcpySync.cc
|
|
|
|
|
hipMemsetSync.cc
|
|
|
|
|
hipMemsetAsync.cc
|
2022-08-05 15:12:24 +05:30
|
|
|
hipMemAdvise.cc
|
2021-08-19 10:29:07 +05:30
|
|
|
)
|
|
|
|
|
endif()
|
2021-04-08 14:09:19 +05:30
|
|
|
|
2022-04-28 04:08:07 +05:30
|
|
|
# skipped due to os related code in tests
|
|
|
|
|
# need to work on them when all the tests are enabled
|
2021-11-25 22:22:46 -08:00
|
|
|
if(UNIX)
|
|
|
|
|
set(TEST_SRC ${TEST_SRC}
|
2022-04-28 04:08:07 +05:30
|
|
|
hipHmmOvrSubscriptionTst.cc
|
|
|
|
|
hipMemoryAllocateCoherent.cc)
|
2021-11-25 22:22:46 -08:00
|
|
|
endif()
|
|
|
|
|
|
2021-11-25 21:32:29 -08:00
|
|
|
hip_add_exe_to_target(NAME MemoryTest
|
|
|
|
|
TEST_SRC ${TEST_SRC}
|
2022-07-01 09:17:47 +01:00
|
|
|
TEST_TARGET_NAME build_tests
|
|
|
|
|
COMPILE_OPTIONS -std=c++14)
|