8760fb4976
* attach: Formalize ROCAttach API - Make ROCAttach public with public headers - Change detach to take a PID - attach and detach are now reentrant - Cleanup of states and signal handling in ptrace session - Fixes mixed up definition of ROCPROF_ATTACH_TOOL_LIBRARY - ROCPROF_ATTACH_TOOL_LIBRARY now always means the tool library loaded by the attachment target - ROCPROF_ATTACH_LIBRARY refers to the library used to perform attachment - Add direct call of rocprof-attach - Fix python library call of rocprof-attach - Function now named attach(), changed from main() * attach: rocprof-compute ROCAttach updates - Update to new library names - Correct usage of C lib detach * attach: add test for rocattach - Disable ASan, TSan, and UBSan for the new parallel-attach test - Lower log level for LSan tests, existing behavior from other tests --------- Co-authored-by: Ammar ELWazir <aelwazir@amd.com>
104 baris
2.8 KiB
CMake
104 baris
2.8 KiB
CMake
#
|
|
# Integration tests
|
|
#
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
if(COMMAND rocprofiler_deactivate_clang_tidy)
|
|
rocprofiler_deactivate_clang_tidy()
|
|
endif()
|
|
|
|
project(rocprofiler-sdk-tests LANGUAGES C CXX)
|
|
|
|
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "tests")
|
|
set(ROCPROFILER_SDK_TESTS_SOURCE_DIR "${PROJECT_SOURCE_DIR}")
|
|
set(ROCPROFILER_SDK_TESTS_BINARY_DIR "${PROJECT_BINARY_DIR}")
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE
|
|
"Release"
|
|
CACHE STRING "" FORCE)
|
|
endif()
|
|
|
|
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)
|
|
|
|
# this should be defaulted to OFF by ROCm 7.0.1 or 7.1 this should only used to disable
|
|
# tests in extreme circumstances
|
|
option(ROCPROFILER_DISABLE_UNSTABLE_CTESTS "Disable unstable tests" ON)
|
|
|
|
enable_testing()
|
|
include(CTest)
|
|
|
|
include(GNUInstallDirs)
|
|
# always use lib instead of lib64
|
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
|
|
|
# define the library output directory
|
|
if(PROJECT_IS_TOP_LEVEL)
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
|
|
else()
|
|
set(CMAKE_MESSAGE_INDENT "[${PROJECT_NAME}] ")
|
|
endif()
|
|
|
|
# needed for validation
|
|
find_package(Python3 REQUIRED)
|
|
|
|
# generally needed
|
|
find_package(rocprofiler-sdk REQUIRED)
|
|
find_package(rocprofiler_sdk_pytest REQUIRED)
|
|
|
|
# get the gfx architectures that are present on the system
|
|
rocprofiler_sdk_get_gfx_architectures(rocprofiler-sdk-tests-gfx-info ECHO)
|
|
|
|
# configure python module <BINARY_DIR>/rocprofiler_sdk/pytest_utils
|
|
add_subdirectory(pytest-packages)
|
|
|
|
# common utilities
|
|
add_subdirectory(common)
|
|
|
|
# unit-test subdirectory only exists in rocprofiler-sdk-tests package
|
|
add_subdirectory(unit-tests)
|
|
|
|
# tool libraries used for data collection during integration tests
|
|
add_subdirectory(tools)
|
|
|
|
# libraries used by integration test applications
|
|
add_subdirectory(lib)
|
|
|
|
# applications used by integration tests
|
|
add_subdirectory(bin)
|
|
|
|
# validation tests
|
|
add_subdirectory(kernel-tracing)
|
|
add_subdirectory(async-copy-tracing)
|
|
add_subdirectory(hsa-memory-allocation)
|
|
add_subdirectory(scratch-memory-tracing)
|
|
add_subdirectory(c-tool)
|
|
add_subdirectory(thread-trace)
|
|
add_subdirectory(pc_sampling)
|
|
add_subdirectory(hip-graph-tracing)
|
|
add_subdirectory(counter-collection)
|
|
add_subdirectory(openmp-tools)
|
|
add_subdirectory(rocdecode)
|
|
add_subdirectory(rocjpeg)
|
|
add_subdirectory(hip-host-tracing)
|
|
add_subdirectory(code-object-multi-threaded)
|
|
|
|
# rocpd validation tests
|
|
add_subdirectory(rocpd)
|
|
|
|
# rocattach validation tests
|
|
add_subdirectory(rocattach)
|
|
|
|
# rocprofv3 validation tests
|
|
add_subdirectory(rocprofv3)
|
|
|
|
# python bindings
|
|
add_subdirectory(python-bindings)
|
|
add_subdirectory(rocprofv3-avail)
|