Update to use rocprofiler-sdk (#55)
- Renames the CMake option "ROCPROFSYS_USE_HIP" to "ROCPROFSYS_USE_ROCM" - Remove the "ROCPROFSYS_USE_ROCM_SMI option. Controlled with the "ROCPROFSYS_USE_ROCM" option, instead. - Runtime configuration can still toggle ROCPROFSYS_USE_ROCM_SMI to disable the sampling. - Rename ROCPROFSYS_HIP_VERSION macro to ROCPROFSYS_ROCM_VERSION and remove blocks for `ROCPROFSYS_ROCM_VERSION < 60000` - Remove ROCPROFSYS_USE_ROCTRACER and ROCPROFSYS_USE_ROCPROFILER - Update test cases - Update docker files and workflows to install cmake 3.21, which is required for the rocprofiler-sdk findPackage script. - Removed rocm-6.2 from workflows due to a rocprofiler-sdk API change.
Šī revīzija ir iekļauta:
1 vecāks
d3725df816
revīzija
88aa2d3cbe
87 files changed
+3842
-6261
No files matched your search
@@ -54,9 +54,7 @@ set(ROCPROFSYS_CPACK_SYSTEM_NAME
|
||||
CACHE STRING "System name, e.g. Linux or Ubuntu-20.04")
|
||||
set(ROCPROFSYS_CPACK_PACKAGE_SUFFIX "")
|
||||
|
||||
if(ROCPROFSYS_USE_HIP
|
||||
OR ROCPROFSYS_USE_ROCTRACER
|
||||
OR ROCPROFSYS_USE_ROCM_SMI)
|
||||
if(ROCPROFSYS_USE_ROCM)
|
||||
set(ROCPROFSYS_CPACK_PACKAGE_SUFFIX
|
||||
"${ROCPROFSYS_CPACK_PACKAGE_SUFFIX}-ROCm-${ROCmVersion_NUMERIC_VERSION}")
|
||||
endif()
|
||||
@@ -159,19 +157,12 @@ if(NOT ROCPROFSYS_BUILD_DYNINST)
|
||||
endif()
|
||||
endif()
|
||||
if(ROCmVersion_FOUND)
|
||||
set(_ROCPROFILER_SUFFIX " (>= 1.0.0.${ROCmVersion_NUMERIC_VERSION})")
|
||||
set(_ROCTRACER_SUFFIX " (>= 1.0.0.${ROCmVersion_NUMERIC_VERSION})")
|
||||
set(_ROCM_SMI_SUFFIX
|
||||
" (>= ${ROCmVersion_MAJOR_VERSION}.0.0.${ROCmVersion_NUMERIC_VERSION})")
|
||||
endif()
|
||||
if(ROCPROFSYS_USE_ROCM_SMI)
|
||||
if(ROCPROFSYS_USE_ROCM)
|
||||
list(APPEND _DEBIAN_PACKAGE_DEPENDS "rocm-smi-lib${_ROCM_SMI_SUFFIX}")
|
||||
endif()
|
||||
if(ROCPROFSYS_USE_ROCTRACER)
|
||||
list(APPEND _DEBIAN_PACKAGE_DEPENDS "roctracer-dev${_ROCTRACER_SUFFIX}")
|
||||
endif()
|
||||
if(ROCPROFSYS_USE_ROCPROFILER)
|
||||
list(APPEND _DEBIAN_PACKAGE_DEPENDS "rocprofiler-dev${_ROCPROFILER_SUFFIX}")
|
||||
list(APPEND _DEBIAN_PACKAGE_DEPENDS "rocprofiler-sdk (>= ${rocprofiler-sdk_VERSION})")
|
||||
endif()
|
||||
if(ROCPROFSYS_USE_MPI)
|
||||
if("${ROCPROFSYS_MPI_IMPL}" STREQUAL "openmpi")
|
||||
|
||||
+16
-16
@@ -109,13 +109,6 @@ set(_ROCPROFSYS_PAPI_COMPONENTS
|
||||
)
|
||||
|
||||
if(ROCPROFSYS_PAPI_AUTO_COMPONENTS)
|
||||
# rocm
|
||||
if(ROCPROFSYS_USE_HIP
|
||||
OR ROCPROFSYS_USE_ROCTRACER
|
||||
OR ROCPROFSYS_USE_ROCM_SMI)
|
||||
list(APPEND _ROCPROFSYS_PAPI_COMPONENTS rocm)
|
||||
endif()
|
||||
|
||||
# lmsensors
|
||||
find_path(ROCPROFSYS_PAPI_LMSENSORS_ROOT_DIR NAMES include/sensors/sensors.h
|
||||
include/sensors.h)
|
||||
@@ -209,28 +202,35 @@ externalproject_add(
|
||||
BUILD_IN_SOURCE 1
|
||||
PATCH_COMMAND
|
||||
${CMAKE_COMMAND} -E env CC=${PAPI_C_COMPILER}
|
||||
CFLAGS=-fPIC\ -O3\ -Wno-stringop-truncation LIBS=-lrt LDFLAGS=-lrt
|
||||
${ROCPROFSYS_PAPI_EXTRA_ENV} <SOURCE_DIR>/configure --quiet
|
||||
CFLAGS=-fPIC\ -O3\ -Wno-stringop-truncation\ -Wno-use-after-free LIBS=-lrt
|
||||
LDFLAGS=-lrt ${ROCPROFSYS_PAPI_EXTRA_ENV} <SOURCE_DIR>/configure --quiet
|
||||
--prefix=${ROCPROFSYS_PAPI_INSTALL_DIR} --with-static-lib=yes --with-shared-lib=no
|
||||
--with-perf-events --with-tests=no
|
||||
--with-components=${_ROCPROFSYS_PAPI_COMPONENTS}
|
||||
--libdir=${ROCPROFSYS_PAPI_INSTALL_DIR}/lib
|
||||
CONFIGURE_COMMAND
|
||||
${CMAKE_COMMAND} -E env CFLAGS=-fPIC\ -O3\ -Wno-stringop-truncation
|
||||
${CMAKE_COMMAND} -E env
|
||||
CFLAGS=-fPIC\ -O3\ -Wno-stringop-truncation\ -Wno-use-after-free
|
||||
${ROCPROFSYS_PAPI_EXTRA_ENV} ${MAKE_EXECUTABLE} static install -s -j
|
||||
${ROCPROFSYS_PAPI_CONFIGURE_JOBS}
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} -E env CFLAGS=-fPIC\ -O3\ -Wno-stringop-truncation
|
||||
${ROCPROFSYS_PAPI_EXTRA_ENV} ${MAKE_EXECUTABLE} utils install-utils -s
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND} -E env
|
||||
CFLAGS=-fPIC\ -O3\ -Wno-stringop-truncation\ -Wno-use-after-free
|
||||
${ROCPROFSYS_PAPI_EXTRA_ENV} ${MAKE_EXECUTABLE} utils install-utils -s
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS "${_ROCPROFSYS_PAPI_BUILD_BYPRODUCTS}")
|
||||
|
||||
# target for re-executing the installation
|
||||
add_custom_target(
|
||||
rocprofiler-systems-papi-install
|
||||
COMMAND ${CMAKE_COMMAND} -E env CFLAGS=-fPIC\ -O3\ -Wno-stringop-truncation
|
||||
${ROCPROFSYS_PAPI_EXTRA_ENV} ${MAKE_EXECUTABLE} static install -s
|
||||
COMMAND ${CMAKE_COMMAND} -E env CFLAGS=-fPIC\ -O3\ -Wno-stringop-truncation
|
||||
${ROCPROFSYS_PAPI_EXTRA_ENV} ${MAKE_EXECUTABLE} utils install-utils -s
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E env
|
||||
CFLAGS=-fPIC\ -O3\ -Wno-stringop-truncation\ -Wno-use-after-free
|
||||
${ROCPROFSYS_PAPI_EXTRA_ENV} ${MAKE_EXECUTABLE} static install -s
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E env
|
||||
CFLAGS=-fPIC\ -O3\ -Wno-stringop-truncation\ -Wno-use-after-free
|
||||
${ROCPROFSYS_PAPI_EXTRA_ENV} ${MAKE_EXECUTABLE} utils install-utils -s
|
||||
WORKING_DIRECTORY ${ROCPROFSYS_PAPI_SOURCE_DIR}/src
|
||||
COMMENT "Installing PAPI...")
|
||||
|
||||
|
||||
+26
-68
@@ -15,14 +15,12 @@ rocprofiler_systems_add_interface_library(rocprofiler-systems-threading
|
||||
rocprofiler_systems_add_interface_library(
|
||||
rocprofiler-systems-dyninst
|
||||
"Provides flags and libraries for Dyninst (dynamic instrumentation)")
|
||||
rocprofiler_systems_add_interface_library(rocprofiler-systems-hip
|
||||
"Provides flags and libraries for HIP")
|
||||
rocprofiler_systems_add_interface_library(rocprofiler-systems-rocm
|
||||
"Provides flags and libraries for ROCm")
|
||||
rocprofiler_systems_add_interface_library(rocprofiler-systems-roctracer
|
||||
"Provides flags and libraries for roctracer")
|
||||
rocprofiler_systems_add_interface_library(rocprofiler-systems-rocprofiler
|
||||
"Provides flags and libraries for rocprofiler")
|
||||
rocprofiler_systems_add_interface_library(rocprofiler-systems-rocm-smi
|
||||
"Provides flags and libraries for rocm-smi")
|
||||
rocprofiler_systems_add_interface_library(
|
||||
rocprofiler-systems-rccl
|
||||
"Provides flags for ROCm Communication Collectives Library (RCCL)")
|
||||
@@ -50,10 +48,7 @@ rocprofiler_systems_add_interface_library(rocprofiler-systems-compile-definition
|
||||
|
||||
# libraries with relevant compile definitions
|
||||
set(ROCPROFSYS_EXTENSION_LIBRARIES
|
||||
rocprofiler-systems::rocprofiler-systems-hip
|
||||
rocprofiler-systems::rocprofiler-systems-roctracer
|
||||
rocprofiler-systems::rocprofiler-systems-rocprofiler
|
||||
rocprofiler-systems::rocprofiler-systems-rocm-smi
|
||||
rocprofiler-systems::rocprofiler-systems-rocm
|
||||
rocprofiler-systems::rocprofiler-systems-rccl
|
||||
rocprofiler-systems::rocprofiler-systems-bfd
|
||||
rocprofiler-systems::rocprofiler-systems-mpi
|
||||
@@ -127,14 +122,11 @@ endforeach()
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
# hip version
|
||||
# ROCm Version
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
if(ROCPROFSYS_USE_HIP
|
||||
OR ROCPROFSYS_USE_ROCTRACER
|
||||
OR ROCPROFSYS_USE_ROCPROFILER
|
||||
OR ROCPROFSYS_USE_ROCM_SMI)
|
||||
if(ROCPROFSYS_USE_ROCM)
|
||||
find_package(ROCmVersion)
|
||||
|
||||
if(NOT ROCmVersion_FOUND)
|
||||
@@ -164,13 +156,13 @@ if(ROCPROFSYS_USE_HIP
|
||||
endif()
|
||||
|
||||
set(ROCPROFSYS_ROCM_VERSION ${ROCmVersion_FULL_VERSION})
|
||||
set(ROCPROFSYS_HIP_VERSION_MAJOR ${ROCmVersion_MAJOR_VERSION})
|
||||
set(ROCPROFSYS_HIP_VERSION_MINOR ${ROCmVersion_MINOR_VERSION})
|
||||
set(ROCPROFSYS_HIP_VERSION_PATCH ${ROCmVersion_PATCH_VERSION})
|
||||
set(ROCPROFSYS_HIP_VERSION ${ROCmVersion_TRIPLE_VERSION})
|
||||
set(ROCPROFSYS_ROCM_VERSION_MAJOR ${ROCmVersion_MAJOR_VERSION})
|
||||
set(ROCPROFSYS_ROCM_VERSION_MINOR ${ROCmVersion_MINOR_VERSION})
|
||||
set(ROCPROFSYS_ROCM_VERSION_PATCH ${ROCmVersion_PATCH_VERSION})
|
||||
set(ROCPROFSYS_ROCM_VERSION ${ROCmVersion_TRIPLE_VERSION})
|
||||
|
||||
if(ROCPROFSYS_HIP_VERSION_MAJOR GREATER_EQUAL 4 AND ROCPROFSYS_HIP_VERSION_MINOR
|
||||
GREATER 3)
|
||||
if(ROCPROFSYS_ROCM_VERSION_MAJOR GREATER_EQUAL 4 AND ROCPROFSYS_ROCM_VERSION_MINOR
|
||||
GREATER 3)
|
||||
set(roctracer_kfdwrapper_LIBRARY)
|
||||
endif()
|
||||
|
||||
@@ -181,64 +173,30 @@ if(ROCPROFSYS_USE_HIP
|
||||
rocprofiler_systems_add_feature(ROCPROFSYS_ROCM_VERSION
|
||||
"ROCm version used by rocprofiler-systems")
|
||||
else()
|
||||
set(ROCPROFSYS_HIP_VERSION "0.0.0")
|
||||
set(ROCPROFSYS_HIP_VERSION_MAJOR 0)
|
||||
set(ROCPROFSYS_HIP_VERSION_MINOR 0)
|
||||
set(ROCPROFSYS_HIP_VERSION_PATCH 0)
|
||||
set(ROCPROFSYS_ROCM_VERSION "0.0.0")
|
||||
set(ROCPROFSYS_ROCM_VERSION_MAJOR 0)
|
||||
set(ROCPROFSYS_ROCM_VERSION_MINOR 0)
|
||||
set(ROCPROFSYS_ROCM_VERSION_PATCH 0)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
# HIP
|
||||
# ROCm
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
if(ROCPROFSYS_USE_HIP)
|
||||
find_package(hip ${rocprofiler_systems_FIND_QUIETLY} REQUIRED)
|
||||
rocprofiler_systems_target_compile_definitions(rocprofiler-systems-hip
|
||||
INTERFACE ROCPROFSYS_USE_HIP)
|
||||
target_link_libraries(rocprofiler-systems-hip INTERFACE hip::host)
|
||||
endif()
|
||||
if(ROCPROFSYS_USE_ROCM)
|
||||
find_package(rocprofiler-sdk ${rocprofiler_systems_FIND_QUIETLY} REQUIRED)
|
||||
rocprofiler_systems_target_compile_definitions(rocprofiler-systems-rocm
|
||||
INTERFACE ROCPROFSYS_USE_ROCM)
|
||||
target_link_libraries(rocprofiler-systems-rocm
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
# roctracer
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
if(ROCPROFSYS_USE_ROCTRACER)
|
||||
find_package(roctracer ${rocprofiler_systems_FIND_QUIETLY} REQUIRED)
|
||||
rocprofiler_systems_target_compile_definitions(rocprofiler-systems-roctracer
|
||||
INTERFACE ROCPROFSYS_USE_ROCTRACER)
|
||||
target_link_libraries(
|
||||
rocprofiler-systems-roctracer
|
||||
INTERFACE roctracer::roctracer rocprofiler-systems::rocprofiler-systems-hip)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
# rocprofiler
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
if(ROCPROFSYS_USE_ROCPROFILER)
|
||||
find_package(rocprofiler ${rocprofiler_systems_FIND_QUIETLY} REQUIRED)
|
||||
rocprofiler_systems_target_compile_definitions(rocprofiler-systems-rocprofiler
|
||||
INTERFACE ROCPROFSYS_USE_ROCPROFILER)
|
||||
target_link_libraries(rocprofiler-systems-rocprofiler
|
||||
INTERFACE rocprofiler::rocprofiler)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
# rocm-smi
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
if(ROCPROFSYS_USE_ROCM_SMI)
|
||||
find_package(rocm-smi ${rocprofiler_systems_FIND_QUIETLY} REQUIRED)
|
||||
rocprofiler_systems_target_compile_definitions(rocprofiler-systems-rocm-smi
|
||||
INTERFACE ROCPROFSYS_USE_ROCM_SMI)
|
||||
target_link_libraries(rocprofiler-systems-rocm-smi INTERFACE rocm-smi::rocm-smi)
|
||||
target_link_libraries(rocprofiler-systems-rocm INTERFACE rocm-smi::rocm-smi)
|
||||
|
||||
# find_package(amd-smi ${rocprofiler_systems_FIND_QUIETLY} REQUIRED)
|
||||
# target_link_libraries(rocprofiler-systems-rocm INTERFACE amd-smi::amd-smi)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
@@ -14,7 +14,3 @@ prepend-path PATH "${ROOT}/bin"
|
||||
prepend-path LD_LIBRARY_PATH "${ROOT}/@CMAKE_INSTALL_LIBDIR@"
|
||||
prepend-path PYTHONPATH "${ROOT}/@CMAKE_INSTALL_PYTHONDIR@"
|
||||
setenv @PROJECT_NAME_UNDERSCORED@_DIR "${ROOT}/@CMAKE_INSTALL_DATAROOTDIR@/cmake/@PROJECT_NAME@"
|
||||
|
||||
# @ROCPROFSYS_HSA_ENV@setenv HSA_TOOLS_LIB "${ROOT}/@CMAKE_INSTALL_LIBDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@rocprof-sys@CMAKE_SHARED_LIBRARY_SUFFIX@"
|
||||
# @ROCPROFSYS_HSA_ENV@setenv HSA_TOOLS_REPORT_LOAD_FAILURE 1
|
||||
# @ROCPROFSYS_ROCP_ENV@setenv ROCP_TOOL_LIB "${ROOT}/@CMAKE_INSTALL_LIBDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@rocprof-sys@CMAKE_SHARED_LIBRARY_SUFFIX@"
|
||||
@@ -26,12 +26,3 @@ export LD_LIBRARY_PATH
|
||||
export PYTHONPATH
|
||||
export CMAKE_PREFIX_PATH
|
||||
export @PROJECT_NAME_UNDERSCORED@_DIR
|
||||
|
||||
# ROCm environment variables
|
||||
# @ROCPROFSYS_HSA_ENV@HSA_TOOLS_LIB="${BASEDIR}/@CMAKE_INSTALL_LIBDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@rocprof-sys-dl@CMAKE_SHARED_LIBRARY_SUFFIX@"
|
||||
# @ROCPROFSYS_HSA_ENV@HSA_TOOLS_REPORT_LOAD_FAILURE=1
|
||||
# @ROCPROFSYS_ROCP_ENV@ROCP_TOOL_LIB="${BASEDIR}/@CMAKE_INSTALL_LIBDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@rocprof-sys@CMAKE_SHARED_LIBRARY_SUFFIX@"
|
||||
|
||||
# @ROCPROFSYS_HSA_ENV@export HSA_TOOLS_LIB
|
||||
# @ROCPROFSYS_HSA_ENV@export HSA_TOOLS_REPORT_LOAD_FAILURE
|
||||
# @ROCPROFSYS_ROCP_ENV@export ROCP_TOOL_LIB
|
||||
Reference in new issue
Block a user