SWDEV-273235 - hip change to build catch tests on Windows (#2472)

* SWDEV-273235 - hip change to build catch tests on Windows

Change-Id: I96de305694609c669cb81480f3572d987ce87d98

* SWDEV-1 - skip failing hipStreamPerThread_DeviceReset_1 test on Linux

[ROCm/hip-tests commit: ec8d624959]
This commit is contained in:
agunashe
2022-02-09 08:17:45 -08:00
committed by GitHub
parent 5515d0422f
commit 6fded87b97
5 changed files with 25 additions and 18 deletions
+8 -2
View File
@@ -1,4 +1,9 @@
cmake_minimum_required(VERSION 3.16.8) cmake_minimum_required(VERSION 3.16.8)
# to skip the simple compiler test
set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)
project(hiptests) project(hiptests)
# Check if platform and compiler are set # Check if platform and compiler are set
@@ -32,8 +37,10 @@ else()
# Set both compilers else windows cmake complains of mismatch # Set both compilers else windows cmake complains of mismatch
cmake_path(SET CMAKE_CXX_COMPILER "${HIP_PATH}/bin/hipcc.bat") cmake_path(SET CMAKE_CXX_COMPILER "${HIP_PATH}/bin/hipcc.bat")
cmake_path(SET CMAKE_C_COMPILER "${HIP_PATH}/bin/hipcc.bat") cmake_path(SET CMAKE_C_COMPILER "${HIP_PATH}/bin/hipcc.bat")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --rocm-path=${ROCM_PATH}")
endif() endif()
if(NOT DEFINED CATCH2_PATH) if(NOT DEFINED CATCH2_PATH)
if(DEFINED ENV{CATCH2_PATH}) if(DEFINED ENV{CATCH2_PATH})
set(CATCH2_PATH $ENV{CATCH2_PATH} CACHE STRING "Catch2 Path") set(CATCH2_PATH $ENV{CATCH2_PATH} CACHE STRING "Catch2 Path")
@@ -128,10 +135,9 @@ add_subdirectory(unit)
add_subdirectory(ABM) add_subdirectory(ABM)
add_subdirectory(hipTestMain) add_subdirectory(hipTestMain)
add_subdirectory(stress) add_subdirectory(stress)
add_subdirectory(TypeQualifiers)
if(UNIX) if(UNIX)
add_subdirectory(multiproc) add_subdirectory(multiproc)
add_subdirectory(TypeQualifiers)
endif() endif()
cmake_policy(POP) cmake_policy(POP)
@@ -0,0 +1,7 @@
{
"DisabledTests":
[
"Unit_hipStreamPerThread_DeviceReset_1"
]
}
@@ -14,10 +14,8 @@ set(LINUX_TEST_SRC
hipMemCoherencyTstMProc.cc hipMemCoherencyTstMProc.cc
) )
if(UNIX) # the last argument linker libraries is required for this test but optional to the function
# the last argument linker libraries is required for this test but optional to the function hip_add_exe_to_target(NAME MultiProc
hip_add_exe_to_target(NAME MultiProc TEST_SRC ${LINUX_TEST_SRC}
TEST_SRC ${LINUX_TEST_SRC} TEST_TARGET_NAME build_tests
TEST_TARGET_NAME build_tests LINKER_LIBS ${CMAKE_DL_LIBS})
LINKER_LIBS ${CMAKE_DL_LIBS})
endif()
+2 -4
View File
@@ -21,7 +21,6 @@
add_subdirectory(memory) add_subdirectory(memory)
add_subdirectory(deviceLib) add_subdirectory(deviceLib)
add_subdirectory(stream) add_subdirectory(stream)
add_subdirectory(streamperthread)
add_subdirectory(event) add_subdirectory(event)
add_subdirectory(occupancy) add_subdirectory(occupancy)
add_subdirectory(device) add_subdirectory(device)
@@ -29,6 +28,5 @@ add_subdirectory(rtc)
add_subdirectory(printf) add_subdirectory(printf)
add_subdirectory(printfExe) add_subdirectory(printfExe)
add_subdirectory(texture) add_subdirectory(texture)
if(UNIX) add_subdirectory(streamperthread)
add_subdirectory(graph) add_subdirectory(graph)
endif()
@@ -6,8 +6,6 @@ set(TEST_SRC
hipStreamPerThread_DeviceReset.cc hipStreamPerThread_DeviceReset.cc
) )
# Create shared lib of all tests hip_add_exe_to_target(NAME StreamPerThreadTest
add_library(StreamPerThreadTest SHARED EXCLUDE_FROM_ALL ${TEST_SRC}) TEST_SRC ${TEST_SRC}
TEST_TARGET_NAME build_tests)
# Add dependency on build_tests to build it on this custom target
add_dependencies(build_tests StreamPerThreadTest)