4d98a0169f
* Updated stream code to handle special cases when stream value is 0x01 or 0x02 * Removed extra definitions and updated tests to account for special case * Modified stream.cpp so that each thread assigned a unique stream ID when hipStreamPerThread is used as stream value. Modified tests to check that threads are assigned unique, repeated values when hipStreamPerThread is called * Updated idx_offset, stream_map, and thread counter to be in one struct. * Update stream.cpp to only use add_stream() and update tests for seperate unit test for hipStreamPerThread * Remove unecessary comment * Removed unecessary line * Updated tests and stream.cpp to update stream ID correctly * Updated test structure
43 wiersze
1.3 KiB
CMake
43 wiersze
1.3 KiB
CMake
#
|
|
#
|
|
#
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
if(NOT CMAKE_HIP_COMPILER)
|
|
find_program(
|
|
amdclangpp_EXECUTABLE
|
|
NAMES amdclang++
|
|
HINTS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATHS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATH_SUFFIXES bin llvm/bin NO_CACHE)
|
|
mark_as_advanced(amdclangpp_EXECUTABLE)
|
|
|
|
if(amdclangpp_EXECUTABLE)
|
|
set(CMAKE_HIP_COMPILER "${amdclangpp_EXECUTABLE}")
|
|
endif()
|
|
endif()
|
|
|
|
project(rocprofiler-sdk-tests-bin-hip-streams-per-thread LANGUAGES CXX HIP)
|
|
|
|
foreach(_TYPE DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
|
|
if("${CMAKE_HIP_FLAGS_${_TYPE}}" STREQUAL "")
|
|
set(CMAKE_HIP_FLAGS_${_TYPE} "${CMAKE_CXX_FLAGS_${_TYPE}}")
|
|
endif()
|
|
endforeach()
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_HIP_STANDARD 17)
|
|
set(CMAKE_HIP_EXTENSIONS OFF)
|
|
set(CMAKE_HIP_STANDARD_REQUIRED ON)
|
|
|
|
set_source_files_properties(hip-streams-per-thread.cpp PROPERTIES LANGUAGE HIP)
|
|
|
|
add_executable(hip-streams-per-thread)
|
|
target_sources(hip-streams-per-thread PRIVATE hip-streams-per-thread.cpp)
|
|
target_link_libraries(hip-streams-per-thread PRIVATE rocprofiler-sdk::tests-build-flags)
|
|
|
|
find_package(Threads REQUIRED)
|
|
target_link_libraries(hip-streams-per-thread PRIVATE Threads::Threads)
|