SWDEV-1 - Refactor of cmake files of stream and memory unit tests (#174)
Change-Id: Ie29641be95e7fb2a191f22e5d1e588d6943a430f
This commit is contained in:
committed by
GitHub
parent
0a8235e5c8
commit
1c4285f3df
+106
-192
@@ -7,213 +7,127 @@
|
||||
# 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 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.
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
set(COMMON_SHARED_SRC DriverContext.cc)
|
||||
|
||||
# Common Tests - Test independent of all platforms
|
||||
set(TEST_SRC
|
||||
memset.cc
|
||||
malloc.cc
|
||||
hipMemcpy2DToArray.cc
|
||||
hipMemcpy2DToArray_old.cc
|
||||
hipMemcpy2DToArrayAsync.cc
|
||||
hipMemcpy2DToArrayAsync_old.cc
|
||||
hipMemcpy3D.cc
|
||||
hipMemcpy3DAsync.cc
|
||||
hipMemcpyParam2D.cc
|
||||
hipMemcpyParam2DAsync.cc
|
||||
hipMemcpy2D.cc
|
||||
hipMemcpy2DAsync.cc
|
||||
hipMemcpy2DFromArray.cc
|
||||
hipMemcpy2DFromArray_old.cc
|
||||
hipMemcpy2DFromArrayAsync.cc
|
||||
hipMemcpy2DFromArrayAsync_old.cc
|
||||
hipMemcpyAtoH.cc
|
||||
hipMemcpyAtoH_old.cc
|
||||
hipMemcpyHtoA.cc
|
||||
hipMemcpyHtoA_old.cc
|
||||
hipMemcpyAllApiNegative.cc
|
||||
hipMemcpy_MultiThread.cc
|
||||
hipHostRegister.cc
|
||||
hipHostUnregister.cc
|
||||
hipHostGetFlags.cc
|
||||
hipHostGetDevicePointer.cc
|
||||
hipMallocManaged_MultiScenario.cc
|
||||
hipMemsetNegative.cc
|
||||
hipMemset.cc
|
||||
hipMemsetAsyncMultiThread.cc
|
||||
hipMemset3D.cc
|
||||
hipMemset2D.cc
|
||||
hipHostMallocTests.cc
|
||||
hipMemset3DFunctional.cc
|
||||
hipMemset3DRegressMultiThread.cc
|
||||
hipMallocManagedFlagsTst.cc
|
||||
hipMemPrefetchAsyncExtTsts.cc
|
||||
hipMemAdviseMmap.cc
|
||||
hipMallocManaged.cc
|
||||
hipMemRangeGetAttribute.cc
|
||||
hipMemRangeGetAttribute_old.cc
|
||||
hipMemcpyFromSymbol.cc
|
||||
hipPtrGetAttribute.cc
|
||||
hipMemPoolApi.cc
|
||||
hipMemcpyPeer.cc
|
||||
hipMemcpyPeer_old.cc
|
||||
hipMemcpyPeerAsync.cc
|
||||
hipMemcpyPeerAsync_old.cc
|
||||
hipMemcpyWithStream_old.cc
|
||||
hipMemcpyWithStream.cc
|
||||
hipMemcpyWithStreamMultiThread.cc
|
||||
hipMemsetAsyncAndKernel.cc
|
||||
hipMemset2DAsyncMultiThreadAndKernel.cc
|
||||
hipMallocConcurrency.cc
|
||||
hipMemcpyDtoD.cc
|
||||
hipMemcpyDtoDAsync.cc
|
||||
hipHostMalloc.cc
|
||||
hipMemcpy_old.cc
|
||||
hipMemcpy_derivatives.cc
|
||||
hipMemcpyAsync.cc
|
||||
hipMemsetFunctional.cc
|
||||
hipMalloc.cc
|
||||
hipMallocPitch.cc
|
||||
hipMallocArray.cc
|
||||
hipMalloc3D.cc
|
||||
hipMalloc3DArray.cc
|
||||
hipArrayCreate.cc
|
||||
hipArray3DCreate.cc
|
||||
hipDrvMemcpy3D.cc
|
||||
hipDrvMemcpy3DAsync.cc
|
||||
hipPointerGetAttribute.cc
|
||||
hipDrvPtrGetAttributes.cc
|
||||
hipMemPrefetchAsync.cc
|
||||
hipMemGetInfo.cc
|
||||
hipFree.cc
|
||||
hipMemcpySync.cc
|
||||
hipMemsetSync.cc
|
||||
hipMemsetAsync.cc
|
||||
hipMemAdvise_old.cc
|
||||
hipMemAdvise.cc
|
||||
hipMemRangeGetAttributes.cc
|
||||
hipStreamAttachMemAsync.cc
|
||||
hipMemRangeGetAttributes_old.cc
|
||||
hipMemGetAddressRange.cc)
|
||||
|
||||
if(HIP_PLATFORM MATCHES "amd")
|
||||
set(TEST_SRC
|
||||
memset.cc
|
||||
malloc.cc
|
||||
hipMemcpy2DToArray.cc
|
||||
hipMemcpy2DToArray_old.cc
|
||||
hipMemcpy2DToArrayAsync.cc
|
||||
hipMemcpy2DToArrayAsync_old.cc
|
||||
hipMemcpy3D.cc
|
||||
hipMemcpy3DAsync.cc
|
||||
hipMemcpyParam2D.cc
|
||||
hipMemcpyParam2DAsync.cc
|
||||
hipMemcpy2D.cc
|
||||
hipMemcpy2DAsync.cc
|
||||
hipMemcpy2DFromArray.cc
|
||||
hipMemcpy2DFromArray_old.cc
|
||||
hipMemcpy2DFromArrayAsync.cc
|
||||
hipMemcpy2DFromArrayAsync_old.cc
|
||||
hipMemcpyAtoH.cc
|
||||
hipMemcpyAtoH_old.cc
|
||||
hipMemcpyHtoA.cc
|
||||
hipMemcpyHtoA_old.cc
|
||||
hipMemcpyAllApiNegative.cc
|
||||
hipMemcpy_MultiThread.cc
|
||||
hipHostRegister.cc
|
||||
hipHostUnregister.cc
|
||||
hipMemPtrGetInfo.cc
|
||||
hipPointerGetAttributes.cc
|
||||
hipHostGetFlags.cc
|
||||
hipHostGetDevicePointer.cc
|
||||
hipMallocManaged_MultiScenario.cc
|
||||
hipMemsetNegative.cc
|
||||
hipMemset.cc
|
||||
hipMemsetAsyncMultiThread.cc
|
||||
hipMemset3D.cc
|
||||
hipMemset2D.cc
|
||||
hipHostMallocTests.cc
|
||||
hipMemset3DFunctional.cc
|
||||
hipMemset3DRegressMultiThread.cc
|
||||
hipMallocManagedFlagsTst.cc
|
||||
hipMemPrefetchAsyncExtTsts.cc
|
||||
hipMemAdviseMmap.cc
|
||||
hipMemCoherencyTst.cc
|
||||
hipMallocManaged.cc
|
||||
hipMemRangeGetAttribute.cc
|
||||
hipMemRangeGetAttribute_old.cc
|
||||
hipMemcpyFromSymbol.cc
|
||||
hipPtrGetAttribute.cc
|
||||
hipMemPoolApi.cc
|
||||
hipMemcpyPeer.cc
|
||||
hipMemcpyPeer_old.cc
|
||||
hipMemcpyPeerAsync.cc
|
||||
hipMemcpyPeerAsync_old.cc
|
||||
hipMemcpyWithStream_old.cc
|
||||
hipMemcpyWithStream.cc
|
||||
hipMemcpyWithStreamMultiThread.cc
|
||||
hipMemsetAsyncAndKernel.cc
|
||||
hipMemset2DAsyncMultiThreadAndKernel.cc
|
||||
hipMallocConcurrency.cc
|
||||
hipMemcpyDtoD.cc
|
||||
hipMemcpyDtoDAsync.cc
|
||||
hipHostMalloc.cc
|
||||
hipMemcpy_old.cc
|
||||
hipMemcpy_derivatives.cc
|
||||
hipMemcpyAsync.cc
|
||||
hipMemsetFunctional.cc
|
||||
hipMalloc.cc
|
||||
hipExtMallocWithFlags.cc
|
||||
hipMallocPitch.cc
|
||||
hipMallocArray.cc
|
||||
hipMalloc3D.cc
|
||||
hipMalloc3DArray.cc
|
||||
hipArrayCreate.cc
|
||||
hipArray3DCreate.cc
|
||||
hipDrvMemcpy3D.cc
|
||||
hipDrvMemcpy3DAsync.cc
|
||||
hipPointerGetAttribute.cc
|
||||
hipDrvPtrGetAttributes.cc
|
||||
hipMallocMngdMultiThread.cc
|
||||
hipMemPrefetchAsync.cc
|
||||
hipArray.cc
|
||||
hipMemVmm.cc
|
||||
hipMemGetInfo.cc
|
||||
hipFree.cc
|
||||
hipMemcpySync.cc
|
||||
hipMemsetSync.cc
|
||||
hipMemsetAsync.cc
|
||||
hipMemAdvise_old.cc
|
||||
hipMemAdvise.cc
|
||||
hipMemRangeGetAttributes.cc
|
||||
hipStreamAttachMemAsync.cc
|
||||
hipMemRangeGetAttributes_old.cc
|
||||
hipMemGetAddressRange.cc
|
||||
)
|
||||
set(TEST_SRC
|
||||
${TEST_SRC}
|
||||
hipMemPtrGetInfo.cc
|
||||
hipPointerGetAttributes.cc
|
||||
hipMemCoherencyTst.cc
|
||||
hipExtMallocWithFlags.cc
|
||||
hipMallocMngdMultiThread.cc
|
||||
hipArray.cc
|
||||
hipMemVmm.cc)
|
||||
else()
|
||||
set(TEST_SRC
|
||||
memset.cc
|
||||
malloc.cc
|
||||
hipMemcpy2DToArray.cc
|
||||
hipMemcpy2DToArray_old.cc
|
||||
hipMemcpy2DToArrayAsync.cc
|
||||
hipMemcpy2DToArrayAsync_old.cc
|
||||
hipMemcpy3D.cc
|
||||
hipMemcpy3DAsync.cc
|
||||
hipMemcpyParam2D.cc
|
||||
hipMemcpyParam2DAsync.cc
|
||||
hipMemcpy2D.cc
|
||||
hipMemcpy2DAsync.cc
|
||||
hipMemcpy2DFromArray.cc
|
||||
hipMemcpy2DFromArray_old.cc
|
||||
hipMemcpy2DFromArrayAsync.cc
|
||||
hipMemcpy2DFromArrayAsync_old.cc
|
||||
hipMemcpyAtoH.cc
|
||||
hipMemcpyAtoH_old.cc
|
||||
hipMemcpyHtoA.cc
|
||||
hipMemcpyHtoA_old.cc
|
||||
hipMemcpyAllApiNegative.cc
|
||||
hipMemcpy_MultiThread.cc
|
||||
hipHostRegister.cc
|
||||
hipHostUnregister.cc
|
||||
hipHostGetFlags.cc
|
||||
hipHostGetDevicePointer.cc
|
||||
hipMallocManaged_MultiScenario.cc
|
||||
hipMemsetNegative.cc
|
||||
hipMemset.cc
|
||||
hipMemsetAsyncMultiThread.cc
|
||||
hipMemset3D.cc
|
||||
hipMemset2D.cc
|
||||
hipHostMallocTests.cc
|
||||
hipMemset3DFunctional.cc
|
||||
hipMemset3DRegressMultiThread.cc
|
||||
hipMallocManagedFlagsTst.cc
|
||||
hipMemPrefetchAsyncExtTsts.cc
|
||||
hipMemAdviseMmap.cc
|
||||
hipMallocManaged.cc
|
||||
hipMemRangeGetAttribute.cc
|
||||
hipMemRangeGetAttribute_old.cc
|
||||
hipMemcpyFromSymbol.cc
|
||||
hipPtrGetAttribute.cc
|
||||
hipMemPoolApi.cc
|
||||
hipMemcpyPeer.cc
|
||||
hipMemcpyPeer_old.cc
|
||||
hipMemcpyPeerAsync.cc
|
||||
hipMemcpyPeerAsync_old.cc
|
||||
hipMemcpyWithStream_old.cc
|
||||
hipMemcpyWithStream.cc
|
||||
hipMemcpyWithStreamMultiThread.cc
|
||||
hipMemsetAsyncAndKernel.cc
|
||||
hipMemset2DAsyncMultiThreadAndKernel.cc
|
||||
hipMallocConcurrency.cc
|
||||
hipMemcpyDtoD.cc
|
||||
hipMemcpyDtoDAsync.cc
|
||||
hipHostMalloc.cc
|
||||
hipMemcpy_old.cc
|
||||
hipMemcpy_derivatives.cc
|
||||
hipMemcpyAsync.cc
|
||||
hipMemsetFunctional.cc
|
||||
hipMalloc.cc
|
||||
hipMallocPitch.cc
|
||||
hipMallocArray.cc
|
||||
hipMalloc3D.cc
|
||||
hipMalloc3DArray.cc
|
||||
hipArrayCreate.cc
|
||||
hipArray3DCreate.cc
|
||||
hipDrvMemcpy3D.cc
|
||||
hipDrvMemcpy3DAsync.cc
|
||||
hipPointerGetAttribute.cc
|
||||
hipDrvPtrGetAttributes.cc
|
||||
hipMemPrefetchAsync.cc
|
||||
hipMemGetInfo.cc
|
||||
hipFree.cc
|
||||
hipMemcpySync.cc
|
||||
hipMemsetSync.cc
|
||||
hipMemsetAsync.cc
|
||||
hipMemAdvise_old.cc
|
||||
hipMemAdvise.cc
|
||||
hipMemRangeGetAttributes.cc
|
||||
hipMemRangeGetAttributes_old.cc
|
||||
hipGetSymbolSizeAddress.cc
|
||||
hipStreamAttachMemAsync.cc
|
||||
hipMemGetAddressRange.cc
|
||||
)
|
||||
set(TEST_SRC ${TEST_SRC} hipGetSymbolSizeAddress.cc)
|
||||
endif()
|
||||
|
||||
# skipped due to os related code in tests
|
||||
# need to work on them when all the tests are enabled
|
||||
# skipped due to os related code in tests need to work on them when all the
|
||||
# tests are enabled
|
||||
if(UNIX)
|
||||
set(TEST_SRC ${TEST_SRC}
|
||||
hipHmmOvrSubscriptionTst.cc
|
||||
hipMemoryAllocateCoherent.cc)
|
||||
set(TEST_SRC ${TEST_SRC} hipHmmOvrSubscriptionTst.cc
|
||||
hipMemoryAllocateCoherent.cc)
|
||||
endif()
|
||||
|
||||
hip_add_exe_to_target(NAME MemoryTest
|
||||
TEST_SRC ${TEST_SRC}
|
||||
TEST_TARGET_NAME build_tests
|
||||
COMMON_SHARED_SRC ${COMMON_SHARED_SRC})
|
||||
TEST_SRC ${TEST_SRC}
|
||||
TEST_TARGET_NAME build_tests COMMON_SHARED_SRC ${COMMON_SHARED_SRC})
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
set(COMMON_SHARED_SRC streamCommon.cc)
|
||||
|
||||
if(HIP_PLATFORM MATCHES "amd")
|
||||
set(TEST_SRC
|
||||
hipStreamCreate.cc
|
||||
hipStreamGetFlags.cc
|
||||
@@ -10,43 +9,30 @@ set(TEST_SRC
|
||||
hipStreamCreateWithFlags.cc
|
||||
hipStreamCreateWithPriority.cc
|
||||
hipStreamDestroy.cc
|
||||
hipStreamGetCUMask.cc
|
||||
hipAPIStreamDisable.cc
|
||||
hipStreamValue.cc
|
||||
hipStreamWithCUMask.cc
|
||||
hipStreamACb_MultiThread.cc
|
||||
hipStreamSynchronize.cc
|
||||
hipStreamQuery.cc
|
||||
hipStreamWaitEvent.cc
|
||||
hipDeviceGetStreamPriorityRange.cc
|
||||
hipStreamACb_StrmSyncTiming.cc
|
||||
)
|
||||
else()
|
||||
set(TEST_SRC
|
||||
hipStreamCreate.cc
|
||||
hipStreamGetFlags.cc
|
||||
hipStreamGetPriority.cc
|
||||
hipMultiStream.cc
|
||||
hipStreamACb_MultiThread.cc
|
||||
hipStreamAddCallback.cc
|
||||
hipStreamCreateWithFlags.cc
|
||||
hipStreamCreateWithPriority.cc
|
||||
hipStreamDestroy.cc
|
||||
hipAPIStreamDisable.cc
|
||||
# hipStreamAttachMemAsync_old.cc # Disabling it on nvidia due to issue in function definition of hipStreamAttachMemAsync
|
||||
# Fixing would break ABI, to be re-enabled when the fix is made.
|
||||
hipStreamValue.cc
|
||||
hipStreamSynchronize.cc
|
||||
hipStreamQuery.cc
|
||||
hipDeviceGetStreamPriorityRange.cc
|
||||
hipStreamACb_StrmSyncTiming.cc
|
||||
)
|
||||
)
|
||||
|
||||
# set_source_files_properties(hipStreamAttachMemAsync_old.cc PROPERTIES COMPILE_FLAGS -std=c++17)
|
||||
if(HIP_PLATFORM MATCHES "amd")
|
||||
set(TEST_SRC ${TEST_SRC} hipStreamGetCUMask.cc hipStreamWithCUMask.cc
|
||||
hipStreamACb_MultiThread.cc hipStreamWaitEvent.cc)
|
||||
else()
|
||||
set(TEST_SRC
|
||||
${TEST_SRC}
|
||||
# hipStreamAttachMemAsync_old.cc # Disabling it on nvidia due to issue
|
||||
# in function definition of hipStreamAttachMemAsync
|
||||
# Fixing would break ABI, to be re-enabled when the fix is made.
|
||||
hipStreamACb_MultiThread.cc)
|
||||
|
||||
# set_source_files_properties(hipStreamAttachMemAsync_old.cc PROPERTIES
|
||||
# COMPILE_FLAGS -std=c++17)
|
||||
endif()
|
||||
|
||||
hip_add_exe_to_target(NAME StreamTest
|
||||
TEST_SRC ${TEST_SRC}
|
||||
TEST_TARGET_NAME build_tests
|
||||
COMPILE_OPTIONS -std=c++17
|
||||
COMMON_SHARED_SRC ${COMMON_SHARED_SRC})
|
||||
hip_add_exe_to_target(
|
||||
NAME StreamTest
|
||||
TEST_SRC ${TEST_SRC} TEST_TARGET_NAME build_tests
|
||||
COMPILE_OPTIONS -std=c++17 COMMON_SHARED_SRC ${COMMON_SHARED_SRC})
|
||||
|
||||
Reference in New Issue
Block a user