From 794e35c3e71993e07bbf075ac1ef56b8b01773f9 Mon Sep 17 00:00:00 2001 From: Jatin Chaudhary Date: Sun, 9 Jul 2023 23:06:30 +0100 Subject: [PATCH 1/2] Add rsp files for windows Change-Id: Ida4fa9cdef1f105d2aeb62705b43bb25c4a1b56f --- catch/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/catch/CMakeLists.txt b/catch/CMakeLists.txt index 8f7aa9262..1659cda20 100644 --- a/catch/CMakeLists.txt +++ b/catch/CMakeLists.txt @@ -141,8 +141,9 @@ if (WIN32) # When args to linker exceeds max chars. # msbuild writes args to a rsp file. # This is used to reference the obj file correctly - SET(CMAKE_C_RESPONSE_FILE_LINK_FLAG "") - SET(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "") + SET(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@") + SET(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@") + SET(CMAKE_NINJA_FORCE_RESPONSE_FILE TRUE CACHE INTERNAL "") endif() if(HIP_PLATFORM STREQUAL "amd") From 98374fd4adcc946d9ef2a3b463855bc0fb7df2df Mon Sep 17 00:00:00 2001 From: Jatin Chaudhary Date: Mon, 10 Jul 2023 10:33:48 +0100 Subject: [PATCH 2/2] Revert split-hack for graph and memory tests Change-Id: I694098795b1e250c2e854778b48f84fee4f2d5db --- catch/unit/graph/CMakeLists.txt | 23 ++++++--------- catch/unit/memory/CMakeLists.txt | 48 ++++++++++++++------------------ 2 files changed, 29 insertions(+), 42 deletions(-) diff --git a/catch/unit/graph/CMakeLists.txt b/catch/unit/graph/CMakeLists.txt index a47bb0038..a139b6b35 100644 --- a/catch/unit/graph/CMakeLists.txt +++ b/catch/unit/graph/CMakeLists.txt @@ -69,20 +69,7 @@ set(TEST_SRC hipStreamBeginCapture.cc hipStreamBeginCapture_old.cc hipStreamIsCapturing.cc - hipStreamIsCapturing_old.cc) - -if(HIP_PLATFORM MATCHES "amd") - set(AMD_SRC - hipStreamCaptureExtModuleLaunchKernel.cc - ) - set(TEST_SRC ${TEST_SRC} ${AMD_SRC}) -endif() - -hip_add_exe_to_target(NAME GraphsTest1 - TEST_SRC ${TEST_SRC} - TEST_TARGET_NAME build_tests) - -set(TEST_SRC + hipStreamIsCapturing_old.cc hipStreamGetCaptureInfo.cc hipStreamGetCaptureInfo_old.cc hipStreamEndCapture.cc @@ -131,9 +118,15 @@ set(TEST_SRC hipGraphKernelNodeGetAttribute.cc hipGraphKernelNodeSetAttribute.cc) +if(HIP_PLATFORM MATCHES "amd") + set(AMD_SRC + hipStreamCaptureExtModuleLaunchKernel.cc) + set(TEST_SRC ${TEST_SRC} ${AMD_SRC}) +endif() + add_custom_target(add_Kernel.code COMMAND ${CMAKE_CXX_COMPILER} --genco ${OFFLOAD_ARCH_STR} ${CMAKE_CURRENT_SOURCE_DIR}/add_Kernel.cpp -o ${CMAKE_CURRENT_BINARY_DIR}/../graph/add_Kernel.code -I${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/ -I${CMAKE_CURRENT_SOURCE_DIR}/../../include --rocm-path=${ROCM_PATH}) -hip_add_exe_to_target(NAME GraphsTest2 +hip_add_exe_to_target(NAME GraphsTest TEST_SRC ${TEST_SRC} TEST_TARGET_NAME build_tests) diff --git a/catch/unit/memory/CMakeLists.txt b/catch/unit/memory/CMakeLists.txt index fa340863a..412204d78 100644 --- a/catch/unit/memory/CMakeLists.txt +++ b/catch/unit/memory/CMakeLists.txt @@ -68,32 +68,7 @@ set(TEST_SRC hipMemAdviseMmap.cc hipMallocManaged.cc hipMemRangeGetAttribute.cc - hipMemRangeGetAttribute_old.cc) - -if(HIP_PLATFORM MATCHES "amd") - set(TEST_SRC - ${TEST_SRC} - hipMemPtrGetInfo.cc - hipPointerGetAttributes.cc - hipMemCoherencyTst.cc - hipExtMallocWithFlags.cc - hipMallocMngdMultiThread.cc - hipArray.cc - hipMemVmm.cc) -else() - set(TEST_SRC ${TEST_SRC} hipGetSymbolSizeAddress.cc) -endif() - -hip_add_exe_to_target(NAME MemoryTest1 - TEST_SRC ${TEST_SRC} - TEST_TARGET_NAME build_tests COMMON_SHARED_SRC ${COMMON_SHARED_SRC}) - -if(HIP_PLATFORM MATCHES "amd") - set_source_files_properties(hipHostRegister.cc PROPERTIES COMPILE_FLAGS -std=c++17) - add_executable(hipHostRegisterPerf EXCLUDE_FROM_ALL hipHostRegister_exe.cc) -endif() - -set(TEST_SRC + hipMemRangeGetAttribute_old.cc hipMemcpyFromSymbol.cc hipPtrGetAttribute.cc hipMemPoolApi.cc @@ -144,6 +119,25 @@ set(TEST_SRC hipMemRangeGetAttributes_old.cc hipMemGetAddressRange.cc) -hip_add_exe_to_target(NAME MemoryTest2 +if(HIP_PLATFORM MATCHES "amd") + set(TEST_SRC + ${TEST_SRC} + hipMemPtrGetInfo.cc + hipPointerGetAttributes.cc + hipMemCoherencyTst.cc + hipExtMallocWithFlags.cc + hipMallocMngdMultiThread.cc + hipArray.cc + hipMemVmm.cc) +else() + set(TEST_SRC ${TEST_SRC} hipGetSymbolSizeAddress.cc) +endif() + +hip_add_exe_to_target(NAME MemoryTest TEST_SRC ${TEST_SRC} TEST_TARGET_NAME build_tests COMMON_SHARED_SRC ${COMMON_SHARED_SRC}) + +if(HIP_PLATFORM MATCHES "amd") + set_source_files_properties(hipHostRegister.cc PROPERTIES COMPILE_FLAGS -std=c++17) + add_executable(hipHostRegisterPerf EXCLUDE_FROM_ALL hipHostRegister_exe.cc) +endif()