Rename Omnitrace to ROCm Systems Profiler (#4)

The Omnitrace program is being renamed. 

Full name: "ROCm Systems Profiler"
Package name: "rocprofiler-systems"
Binary / Library names: "rocprof-sys-*"

---------
Co-authored-by: Xuan Chen <xuchen@amd.com>
Signed-off-by: David Galiffi <David.Galiffi@amd.com>

[ROCm/rocprofiler-systems commit: d07bf508a9]
This commit is contained in:
David Galiffi
2024-10-15 11:20:40 -04:00
کامیت شده توسط GitHub
والد c444ba6131
کامیت 489eda995d
420فایلهای تغییر یافته به همراه10418 افزوده شده و 9914 حذف شده
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-examples LANGUAGES C CXX)
project(rocprofiler-systems-examples LANGUAGES C CXX)
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE
@@ -17,26 +17,27 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_CLANG_TIDY)
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME examples)
if(OMNITRACE_BUILD_DEBUG)
if(ROCPROFSYS_BUILD_DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -fno-omit-frame-pointer")
endif()
option(BUILD_SHARED_LIBS "Build dynamic libraries" ON)
if(CMAKE_PROJECT_NAME STREQUAL "omnitrace")
if(CMAKE_PROJECT_NAME STREQUAL "rocprofiler-systems")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
omnitrace_add_option(OMNITRACE_INSTALL_EXAMPLES "Install omnitrace examples" OFF)
rocprofiler_systems_add_option(ROCPROFSYS_INSTALL_EXAMPLES
"Install rocprofiler-systems examples" OFF)
else()
option(OMNITRACE_INSTALL_EXAMPLES "Install omnitrace examples" ON)
option(ROCPROFSYS_INSTALL_EXAMPLES "Install rocprofiler-systems examples" ON)
endif()
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
include(GNUInstallDirs)
endif()
set(OMNITRACE_EXAMPLE_ROOT_DIR
set(ROCPROFSYS_EXAMPLE_ROOT_DIR
${CMAKE_CURRENT_LIST_DIR}
CACHE INTERNAL "")
# defines function for creating causal profiling exes
@@ -3,8 +3,8 @@
#
include_guard(DIRECTORY)
if(NOT TARGET omnitrace::omnitrace-user-library)
find_package(omnitrace REQUIRED COMPONENTS user)
if(NOT TARGET rocprofiler-systems::rocprofiler-systems-user-library)
find_package(rocprofiler-systems REQUIRED COMPONENTS user)
endif()
if(NOT coz-profiler_FOUND)
@@ -15,11 +15,11 @@ if(NOT TARGET omni-causal-examples)
add_custom_target(omni-causal-examples)
endif()
function(omnitrace_causal_example_executable _NAME)
function(rocprofiler_systems_causal_example_executable _NAME)
cmake_parse_arguments(
CAUSAL "" "" "SOURCES;DEFINITIONS;INCLUDE_DIRECTORIES;LINK_LIBRARIES" ${ARGN})
function(omnitrace_causal_example_interface _TARGET)
function(rocprofiler_systems_causal_example_interface _TARGET)
if(NOT TARGET ${_TARGET})
find_package(Threads REQUIRED)
add_library(${_TARGET} INTERFACE)
@@ -27,8 +27,8 @@ function(omnitrace_causal_example_executable _NAME)
endif()
endfunction()
omnitrace_causal_example_interface(omni-causal-example-lib-debug)
omnitrace_causal_example_interface(omni-causal-example-lib-no-debug)
rocprofiler_systems_causal_example_interface(omni-causal-example-lib-debug)
rocprofiler_systems_causal_example_interface(omni-causal-example-lib-no-debug)
target_compile_options(omni-causal-example-lib-debug
INTERFACE -g3 -fno-omit-frame-pointer)
@@ -37,48 +37,54 @@ function(omnitrace_causal_example_executable _NAME)
add_executable(${_NAME} ${CAUSAL_SOURCES})
target_compile_definitions(${_NAME} PRIVATE USE_COZ=0 USE_OMNI=0
${CAUSAL_DEFINITIONS})
target_include_directories(${_NAME} PRIVATE ${OMNITRACE_EXAMPLE_ROOT_DIR}/causal
target_include_directories(${_NAME} PRIVATE ${ROCPROFSYS_EXAMPLE_ROOT_DIR}/causal
${CAUSAL_INCLUDE_DIRECTORIES})
target_link_libraries(
${_NAME} PRIVATE ${CAUSAL_LINK_LIBRARIES} omnitrace::omnitrace-user-library
omni-causal-example-lib-debug)
${_NAME}
PRIVATE ${CAUSAL_LINK_LIBRARIES}
rocprofiler-systems::rocprofiler-systems-user-library
omni-causal-example-lib-debug)
add_executable(${_NAME}-omni ${CAUSAL_SOURCES})
target_compile_definitions(${_NAME}-omni PRIVATE USE_COZ=0 USE_OMNI=1
${CAUSAL_DEFINITIONS})
target_include_directories(${_NAME}-omni PRIVATE ${OMNITRACE_EXAMPLE_ROOT_DIR}/causal
target_include_directories(${_NAME}-omni PRIVATE ${ROCPROFSYS_EXAMPLE_ROOT_DIR}/causal
${CAUSAL_INCLUDE_DIRECTORIES})
target_link_libraries(
${_NAME}-omni PRIVATE ${CAUSAL_LINK_LIBRARIES} omnitrace::omnitrace-user-library
omni-causal-example-lib-debug)
${_NAME}-omni
PRIVATE ${CAUSAL_LINK_LIBRARIES}
rocprofiler-systems::rocprofiler-systems-user-library
omni-causal-example-lib-debug)
add_executable(${_NAME}-ndebug ${CAUSAL_SOURCES})
target_compile_definitions(${_NAME}-ndebug PRIVATE USE_COZ=0 USE_OMNI=0
${CAUSAL_DEFINITIONS})
target_include_directories(
${_NAME}-ndebug PRIVATE ${OMNITRACE_EXAMPLE_ROOT_DIR}/causal
${_NAME}-ndebug PRIVATE ${ROCPROFSYS_EXAMPLE_ROOT_DIR}/causal
${CAUSAL_INCLUDE_DIRECTORIES})
target_link_libraries(
${_NAME}-ndebug
PRIVATE ${CAUSAL_LINK_LIBRARIES} omnitrace::omnitrace-user-library
PRIVATE ${CAUSAL_LINK_LIBRARIES}
rocprofiler-systems::rocprofiler-systems-user-library
omni-causal-example-lib-no-debug)
add_executable(${_NAME}-omni-ndebug ${CAUSAL_SOURCES})
target_compile_definitions(${_NAME}-omni-ndebug PRIVATE USE_COZ=0 USE_OMNI=1
${CAUSAL_DEFINITIONS})
target_include_directories(
${_NAME}-omni-ndebug PRIVATE ${OMNITRACE_EXAMPLE_ROOT_DIR}/causal
${_NAME}-omni-ndebug PRIVATE ${ROCPROFSYS_EXAMPLE_ROOT_DIR}/causal
${CAUSAL_INCLUDE_DIRECTORIES})
target_link_libraries(
${_NAME}-omni-ndebug
PRIVATE ${CAUSAL_LINK_LIBRARIES} omnitrace::omnitrace-user-library
PRIVATE ${CAUSAL_LINK_LIBRARIES}
rocprofiler-systems::rocprofiler-systems-user-library
omni-causal-example-lib-no-debug)
add_dependencies(omni-causal-examples ${_NAME} ${_NAME}-omni ${_NAME}-ndebug
${_NAME}-omni-ndebug)
if(coz-profiler_FOUND)
omnitrace_causal_example_interface(omni-causal-example-lib-coz)
rocprofiler_systems_causal_example_interface(omni-causal-example-lib-coz)
target_compile_options(omni-causal-example-lib-coz
INTERFACE -g3 -gdwarf-3 -fno-omit-frame-pointer)
@@ -86,7 +92,7 @@ function(omnitrace_causal_example_executable _NAME)
target_compile_definitions(${_NAME}-coz PRIVATE USE_COZ=1 USE_OMNI=0
${CAUSAL_DEFINITIONS})
target_include_directories(
${_NAME}-coz PRIVATE ${OMNITRACE_EXAMPLE_ROOT_DIR}/causal
${_NAME}-coz PRIVATE ${ROCPROFSYS_EXAMPLE_ROOT_DIR}/causal
${CAUSAL_INCLUDE_DIRECTORIES})
target_link_libraries(${_NAME}-coz PRIVATE ${CAUSAL_LINK_LIBRARIES}
omni-causal-example-lib-coz coz::coz)
@@ -94,11 +100,11 @@ function(omnitrace_causal_example_executable _NAME)
add_dependencies(omni-causal-examples ${_NAME}-coz)
endif()
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
TARGETS ${_NAME} ${_NAME}-omni ${_NAME}-coz
DESTINATION bin
COMPONENT omnitrace-examples
COMPONENT rocprofiler-systems-examples
OPTIONAL)
endif()
endfunction()
@@ -1,20 +1,20 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-causal-example LANGUAGES CXX)
project(rocprofiler-systems-causal-example LANGUAGES CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
set(CMAKE_BUILD_TYPE "Release")
find_package(Threads REQUIRED)
if(NOT TARGET omnitrace::omnitrace-user-library)
find_package(omnitrace REQUIRED COMPONENTS user)
if(NOT TARGET rocprofiler-systems::rocprofiler-systems-user-library)
find_package(rocprofiler-systems REQUIRED COMPONENTS user)
endif()
add_library(causal-interface-library INTERFACE)
@@ -23,19 +23,19 @@ target_compile_options(causal-interface-library INTERFACE -g3 -gdwarf-3
target_link_libraries(causal-interface-library INTERFACE Threads::Threads
${CMAKE_DL_LIBS})
omnitrace_causal_example_executable(
rocprofiler_systems_causal_example_executable(
"causal-both"
SOURCES causal.cpp impl.cpp
LINK_LIBRARIES causal-interface-library
DEFINITIONS USE_RNG=1 USE_CPU=1)
omnitrace_causal_example_executable(
rocprofiler_systems_causal_example_executable(
"causal-rng"
SOURCES causal.cpp impl.cpp
LINK_LIBRARIES causal-interface-library
DEFINITIONS USE_RNG=1 USE_CPU=0)
omnitrace_causal_example_executable(
rocprofiler_systems_causal_example_executable(
"causal-cpu"
SOURCES causal.cpp impl.cpp
LINK_LIBRARIES causal-interface-library
@@ -1,6 +1,6 @@
// MIT License
//
// Copyright (c) 2022 Advanced Micro Devices, Inc. All Rights Reserved.
// Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -27,11 +27,11 @@
#define CAUSAL_LABEL __FILE__ ":" CAUSAL_STR(__LINE__)
#if defined(USE_OMNI) && USE_OMNI > 0
# include <omnitrace/causal.h>
# define CAUSAL_PROGRESS OMNITRACE_CAUSAL_PROGRESS
# define CAUSAL_PROGRESS_NAMED(LABEL) OMNITRACE_CAUSAL_PROGRESS_NAMED(LABEL)
# define CAUSAL_BEGIN(LABEL) OMNITRACE_CAUSAL_BEGIN(LABEL)
# define CAUSAL_END(LABEL) OMNITRACE_CAUSAL_END(LABEL)
# include <rocprofiler-systems/causal.h>
# define CAUSAL_PROGRESS ROCPROFSYS_CAUSAL_PROGRESS
# define CAUSAL_PROGRESS_NAMED(LABEL) ROCPROFSYS_CAUSAL_PROGRESS_NAMED(LABEL)
# define CAUSAL_BEGIN(LABEL) ROCPROFSYS_CAUSAL_BEGIN(LABEL)
# define CAUSAL_END(LABEL) ROCPROFSYS_CAUSAL_END(LABEL)
#elif defined(USE_COZ) && USE_COZ > 0
# include <coz.h>
# define CAUSAL_PROGRESS COZ_PROGRESS_NAMED(CAUSAL_LABEL)
@@ -1,6 +1,6 @@
// MIT License
//
// Copyright (c) 2022 Advanced Micro Devices, Inc. All Rights Reserved.
// Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -61,7 +61,7 @@ get_clock_cpu_now() noexcept;
} // namespace
//
// This implementation works well for Omnitrace
// This implementation works well for rocprof-sys
// while COZ makes poor predictions
//
template <bool V>
@@ -82,7 +82,7 @@ template bool rng_impl_func<false>(int64_t, uint64_t);
//
// This implementation works well for COZ
// while Omnitrace makes poor predictions
// while rocprof-sys makes poor predictions
//
template <bool V>
bool
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(omnitrace-code-coverage-example LANGUAGES CXX)
project(rocprofiler-systems-code-coverage-example LANGUAGES CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
@@ -19,11 +19,11 @@ add_executable(code-coverage code-coverage.cpp)
target_link_libraries(code-coverage PRIVATE Threads::Threads)
target_compile_options(code-coverage PRIVATE ${_FLAGS})
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
TARGETS code-coverage
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
set(PYTHON_FILES code-coverage.py)
@@ -37,11 +37,11 @@ if(Python3_FOUND)
configure_file(${PROJECT_SOURCE_DIR}/${_FILE} ${PROJECT_BINARY_DIR}/${_FILE}
@ONLY)
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
PROGRAMS ${PROJECT_BINARY_DIR}/${_FILE}
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
endforeach()
endif()
@@ -1,6 +1,6 @@
#!@PYTHON_EXECUTABLE@
import omnitrace
import rocprofsys
import argparse
if __name__ == "__main__":
@@ -28,15 +28,15 @@ if __name__ == "__main__":
data = None
for itr in args.input:
_summary, _details = omnitrace.coverage.load(itr)
_summary, _details = rocprofsys.coverage.load(itr)
if data is None:
data = _details
else:
data = omnitrace.coverage.concat(data, _details)
data = rocprofsys.coverage.concat(data, _details)
summary = omnitrace.coverage.get_summary(data)
top = omnitrace.coverage.get_top(data)
bottom = omnitrace.coverage.get_bottom(data)
summary = rocprofsys.coverage.get_summary(data)
top = rocprofsys.coverage.get_top(data)
bottom = rocprofsys.coverage.get_bottom(data)
print("Top code coverage:")
for itr in top:
@@ -51,4 +51,4 @@ if __name__ == "__main__":
)
print("\nSaving code coverage")
omnitrace.coverage.save(summary, data, args.output)
rocprofsys.coverage.save(summary, data, args.output)
@@ -1,19 +1,20 @@
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(omnitrace-fork LANGUAGES CXX)
project(rocprofiler-systems-fork LANGUAGES CXX)
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
string(REPLACE " " ";" _FLAGS "${CMAKE_CXX_FLAGS_DEBUG}")
find_package(Threads REQUIRED)
find_package(omnitrace REQUIRED COMPONENTS user)
find_package(rocprofiler-systems REQUIRED COMPONENTS user)
add_executable(fork-example fork.cpp)
target_link_libraries(fork-example PRIVATE Threads::Threads omnitrace::omnitrace)
target_link_libraries(fork-example PRIVATE Threads::Threads
rocprofiler-systems::rocprofiler-systems)
target_compile_options(fork-example PRIVATE ${_FLAGS})
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
TARGETS fork-example
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
@@ -1,5 +1,5 @@
#include <omnitrace/user.h>
#include <rocprofiler-systems/user.h>
#include <chrono>
#include <cstdio>
@@ -33,7 +33,7 @@ run(const char* _name, int nchildren)
pthread_barrier_init(&_barrier, nullptr, nchildren + 1);
for(int i = 0; i < nchildren; ++i)
{
omnitrace_user_push_region("launch_child");
rocprofsys_user_push_region("launch_child");
auto _run = [&_barrier, &_children, i, _name](uint64_t _nsec) {
pthread_barrier_wait(&_barrier);
_children.at(i) = fork();
@@ -43,13 +43,13 @@ run(const char* _name, int nchildren)
print_info(_name);
printf("[%s][%i] child job starting...\n", _name, getpid());
auto _sleep = [=]() {
omnitrace_user_push_region("child_process_child_thread");
rocprofsys_user_push_region("child_process_child_thread");
std::this_thread::sleep_for(std::chrono::seconds{ _nsec });
omnitrace_user_pop_region("child_process_child_thread");
rocprofsys_user_pop_region("child_process_child_thread");
};
omnitrace_user_push_region("child_process");
rocprofsys_user_push_region("child_process");
std::thread{ _sleep }.join();
omnitrace_user_push_region("child_process");
rocprofsys_user_push_region("child_process");
printf("[%s][%i] child job complete\n", _name, getpid());
exit(EXIT_SUCCESS);
}
@@ -59,7 +59,7 @@ run(const char* _name, int nchildren)
}
};
_threads.emplace_back(_run, i + 1);
omnitrace_user_pop_region("launch_child");
rocprofsys_user_pop_region("launch_child");
}
// all child threads should start executing their fork once this returns
@@ -67,7 +67,7 @@ run(const char* _name, int nchildren)
// wait for the threads to successfully fork
pthread_barrier_wait(&_barrier);
omnitrace_user_push_region("wait_for_children");
rocprofsys_user_push_region("wait_for_children");
int _status = 0;
pid_t _wait_pid = 0;
@@ -110,7 +110,7 @@ run(const char* _name, int nchildren)
for(auto& itr : _threads)
itr.join();
omnitrace_user_pop_region("wait_for_children");
rocprofsys_user_pop_region("wait_for_children");
printf("[%s][%i] returning (error code: %i) ...\n", _name, getpid(), _status);
return _status;
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-lulesh-example LANGUAGES C CXX)
project(rocprofiler-systems-lulesh-example LANGUAGES C CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
@@ -65,18 +65,18 @@ endif()
file(GLOB headers ${PROJECT_SOURCE_DIR}/*.h ${PROJECT_SOURCE_DIR}/*.hxx)
file(GLOB sources ${PROJECT_SOURCE_DIR}/*.cc)
omnitrace_causal_example_executable(
rocprofiler_systems_causal_example_executable(
"lulesh"
SOURCES ${sources} ${headers}
LINK_LIBRARIES Kokkos::kokkos lulesh-mpi
INCLUDE_DIRECTORIES ${PROJECT_SOURCE_DIR}/includes)
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
if(LULESH_BUILD_KOKKOS)
install(
TARGETS kokkoscore kokkoscontainers
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
set_target_properties(lulesh PROPERTIES INSTALL_RPATH
"\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
endif()
@@ -1,24 +1,25 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-mpi-examples LANGUAGES C CXX)
project(rocprofiler-systems-mpi-examples LANGUAGES C CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
find_package(MPI)
if(NOT MPI_FOUND)
if("${CMAKE_PROJECT_NAME}" STREQUAL "omnitrace" AND "$ENV{OMNITRACE_CI}")
if("${CMAKE_PROJECT_NAME}" STREQUAL "rocprofiler-systems" AND "$ENV{ROCPROFSYS_CI}")
set(_MSG_TYPE STATUS) # don't generate warnings during CI
else()
set(_MSG_TYPE AUTHOR_WARNING)
endif()
message(${_MSG_TYPE} "MPI could not be found. Cannot build omnitrace-mpi target")
message(${_MSG_TYPE}
"MPI could not be found. Cannot build rocprofiler-systems-mpi target")
return()
endif()
@@ -29,8 +30,9 @@ set(CMAKE_BUILD_TYPE "RelWithDebInfo")
add_library(mpi-c-interface-library INTERFACE)
target_link_libraries(
mpi-c-interface-library
INTERFACE Threads::Threads MPI::MPI_C
$<TARGET_NAME_IF_EXISTS:omnitrace::omnitrace-compile-options>)
INTERFACE
Threads::Threads MPI::MPI_C
$<TARGET_NAME_IF_EXISTS:rocprofiler-systems::rocprofiler-systems-compile-options>)
target_compile_options(mpi-c-interface-library INTERFACE -Wno-double-promotion)
add_executable(mpi-allgather allgather.c)
@@ -59,16 +61,17 @@ set(CMAKE_BUILD_TYPE "Release")
add_library(mpi-cxx-interface-library INTERFACE)
target_link_libraries(
mpi-cxx-interface-library
INTERFACE Threads::Threads MPI::MPI_CXX
$<TARGET_NAME_IF_EXISTS:omnitrace::omnitrace-compile-options>)
INTERFACE
Threads::Threads MPI::MPI_CXX
$<TARGET_NAME_IF_EXISTS:rocprofiler-systems::rocprofiler-systems-compile-options>)
add_executable(mpi-example mpi.cpp)
target_link_libraries(mpi-example PRIVATE mpi-cxx-interface-library)
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
TARGETS mpi-example mpi-allgather mpi-bcast mpi-all2all mpi-reduce
mpi-scatter-gather mpi-send-recv
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-openmp LANGUAGES CXX)
project(rocprofiler-systems-openmp LANGUAGES CXX)
file(GLOB common_source ${CMAKE_CURRENT_SOURCE_DIR}/common/*.cpp)
add_library(openmp-common OBJECT ${common_source})
@@ -15,9 +15,9 @@ option(USE_CLANG_OMP "Use the clang OpenMP if available" ON)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
find_package(OpenMP REQUIRED)
target_link_libraries(openmp-common PUBLIC OpenMP::OpenMP_CXX)
set(OMNITRACE_OPENMP_USING_LIBOMP_LIBRARY
set(ROCPROFSYS_OPENMP_USING_LIBOMP_LIBRARY
ON
CACHE INTERNAL "Used by omnitrace testing" FORCE)
CACHE INTERNAL "Used by rocprofiler-systems testing" FORCE)
else()
find_program(CLANGXX_EXECUTABLE NAMES clang++)
find_library(
@@ -25,31 +25,34 @@ else()
NAMES omp omp5 ${CMAKE_SHARED_LIBRARY_PREFIX}omp${CMAKE_SHARED_LIBRARY_SUFFIX}.5)
if(CLANGXX_EXECUTABLE
AND LIBOMP_LIBRARY
AND COMMAND omnitrace_custom_compilation
AND COMMAND rocprofiler_systems_custom_compilation
AND USE_CLANG_OMP)
target_compile_options(openmp-common PUBLIC -W -Wall -fopenmp=libomp)
target_link_libraries(openmp-common PUBLIC ${LIBOMP_LIBRARY})
omnitrace_custom_compilation(COMPILER ${CLANGXX_EXECUTABLE} TARGET openmp-common)
omnitrace_custom_compilation(COMPILER ${CLANGXX_EXECUTABLE} TARGET openmp-cg)
omnitrace_custom_compilation(COMPILER ${CLANGXX_EXECUTABLE} TARGET openmp-lu)
set(OMNITRACE_OPENMP_USING_LIBOMP_LIBRARY
rocprofiler_systems_custom_compilation(COMPILER ${CLANGXX_EXECUTABLE} TARGET
openmp-common)
rocprofiler_systems_custom_compilation(COMPILER ${CLANGXX_EXECUTABLE} TARGET
openmp-cg)
rocprofiler_systems_custom_compilation(COMPILER ${CLANGXX_EXECUTABLE} TARGET
openmp-lu)
set(ROCPROFSYS_OPENMP_USING_LIBOMP_LIBRARY
ON
CACHE INTERNAL "Used by omnitrace testing" FORCE)
CACHE INTERNAL "Used by rocprofiler-systems testing" FORCE)
else()
find_package(OpenMP REQUIRED)
target_link_libraries(openmp-common PUBLIC OpenMP::OpenMP_CXX)
set(OMNITRACE_OPENMP_USING_LIBOMP_LIBRARY
set(ROCPROFSYS_OPENMP_USING_LIBOMP_LIBRARY
OFF
CACHE INTERNAL "Used by omnitrace testing" FORCE)
CACHE INTERNAL "Used by rocprofiler-systems testing" FORCE)
endif()
endif()
target_link_libraries(openmp-cg PRIVATE openmp-common)
target_link_libraries(openmp-lu PRIVATE openmp-common)
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
TARGETS openmp-cg openmp-lu
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-parallel-overhead-example LANGUAGES CXX)
project(rocprofiler-systems-parallel-overhead-example LANGUAGES CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
@@ -26,9 +26,9 @@ target_link_libraries(parallel-overhead-locks PRIVATE Threads::Threads
parallel-overhead-compile-options)
target_compile_definitions(parallel-overhead-locks PRIVATE USE_LOCKS=1)
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
TARGETS parallel-overhead parallel-overhead-locks
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-python)
project(rocprofiler-systems-python)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
@@ -22,11 +22,11 @@ if(Python3_FOUND)
configure_file(${PROJECT_SOURCE_DIR}/${_FILE} ${PROJECT_BINARY_DIR}/${_FILE}
@ONLY)
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
PROGRAMS ${PROJECT_BINARY_DIR}/${_FILE}
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
endforeach()
endif()
@@ -3,9 +3,9 @@
import os
import sys
import time
import omnitrace
from omnitrace.user import region as omni_user_region
from omnitrace.profiler import config as omni_config
import rocprofsys
from rocprofsys.user import region as omni_user_region
from rocprofsys.profiler import config as omni_config
_prefix = ""
@@ -14,7 +14,7 @@ def loop(n):
pass
@omnitrace.profile()
@rocprofsys.profile()
def run(i, n, v):
for l in range(n * n):
loop(v + l)
@@ -3,8 +3,8 @@
import os
import sys
import time
import omnitrace
from omnitrace.user import region as omni_user_region
import rocprofsys
from rocprofsys.user import region as omni_user_region
_prefix = ""
@@ -50,7 +50,7 @@ except ImportError as e:
return _ret
@omnitrace.profile()
@rocprofsys.profile()
def run(n):
_ret = 0
_ret += fib(n)
@@ -78,6 +78,6 @@ if __name__ == "__main__":
for i in range(args.num_iterations):
with omni_user_region(f"main_loop"):
if args.stop_profile > 0 and i == args.stop_profile:
omnitrace.user.stop_trace()
rocprofsys.user.stop_trace()
ans = run(args.value)
print(f"[{_prefix}] [{i}] result of run({args.value}) = {ans}\n")
@@ -3,8 +3,8 @@
import os
import sys
import time
import omnitrace
from omnitrace.user import region as omni_user_region
import rocprofsys
from rocprofsys.user import region as omni_user_region
import random
_prefix = ""
@@ -33,7 +33,7 @@ def inefficient(n):
return _ret
@omnitrace.profile()
@rocprofsys.profile()
def run(n):
_ret = 0
_ret += fib(n)
@@ -61,6 +61,6 @@ if __name__ == "__main__":
for i in range(args.num_iterations):
with omni_user_region(f"main_loop"):
if args.stop_profile > 0 and i == args.stop_profile:
omnitrace.user.stop_trace()
rocprofsys.user.stop_trace()
ans = run(args.value)
print(f"[{_prefix}] [{i}] result of run({args.value}) = {ans}\n")
@@ -1,24 +1,24 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-rccl-example LANGUAGES CXX)
project(rocprofiler-systems-rccl-example LANGUAGES CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
function(rccl_message _MSG_TYPE)
if("${CMAKE_PROJECT_NAME}" STREQUAL "omnitrace"
AND "$ENV{OMNITRACE_CI}"
if("${CMAKE_PROJECT_NAME}" STREQUAL "rocprofiler-systems"
AND "$ENV{ROCPROFSYS_CI}"
AND "${_MSG_TYPE}" MATCHES "WARNING")
set(_MSG_TYPE STATUS) # don't generate warnings during CI
endif()
if("${CMAKE_PROJECT_NAME}" STREQUAL "omnitrace")
omnitrace_message(${_MSG_TYPE} ${ARGN})
if("${CMAKE_PROJECT_NAME}" STREQUAL "rocprofiler-systems")
rocprofiler_systems_message(${_MSG_TYPE} ${ARGN})
else()
message(${_MSG_TYPE} ${ARGN})
endif()
@@ -31,10 +31,10 @@ if(NOT hip_FOUND)
return()
endif()
if("${CMAKE_PROJECT_NAME}" STREQUAL "omnitrace"
AND ("$ENV{OMNITRACE_CI}"
OR OMNITRACE_CI
OR OMNITRACE_BUILD_CI))
if("${CMAKE_PROJECT_NAME}" STREQUAL "rocprofiler-systems"
AND ("$ENV{ROCPROFSYS_CI}"
OR ROCPROFSYS_CI
OR ROCPROFSYS_BUILD_CI))
find_package(rccl QUIET) # avoid generating warning in CI
else()
find_package(rccl)
@@ -47,8 +47,7 @@ endif()
if(hip_FOUND AND rccl_FOUND)
include(FetchContent)
fetchcontent_declare(
rccl-tests GIT_REPOSITORY https://github.com/ROCmSoftwarePlatform/rccl-tests.git)
fetchcontent_declare(rccl-tests GIT_REPOSITORY https://github.com/ROCm/rccl-tests.git)
# After the following call, the CMake targets defined by googletest and Catch2 will be
# available to the rest of the build
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(omnitrace-rewrite-caller-example LANGUAGES CXX)
project(rocprofiler-systems-rewrite-caller-example LANGUAGES CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
@@ -16,9 +16,9 @@ set(CMAKE_BUILD_TYPE "Debug")
add_executable(rewrite-caller rewrite-caller.cpp)
target_compile_options(rewrite-caller PRIVATE ${_FLAGS})
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
TARGETS rewrite-caller
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(omnitrace-trace-time-window-example LANGUAGES CXX)
project(rocprofiler-systems-trace-time-window-example LANGUAGES CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
@@ -16,9 +16,9 @@ set(CMAKE_BUILD_TYPE "Debug")
add_executable(trace-time-window trace-time-window.cpp)
target_compile_options(trace-time-window PRIVATE ${_FLAGS})
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
TARGETS trace-time-window
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-transpose-example LANGUAGES CXX)
project(rocprofiler-systems-transpose-example LANGUAGES CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
@@ -36,7 +36,7 @@ endif()
if((NOT CMAKE_CXX_COMPILER_IS_HIPCC OR (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang"
AND NOT hip_FOUND))
AND (NOT COMMAND omnitrace_custom_compilation AND NOT HIPCC_EXECUTABLE))
AND (NOT COMMAND rocprofiler_systems_custom_compilation AND NOT HIPCC_EXECUTABLE))
message(AUTHOR_WARNING "transpose target could not be built")
return()
endif()
@@ -56,8 +56,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang"
AND NOT HIPCC_EXECUTABLE)
target_link_libraries(
transpose
PRIVATE $<TARGET_NAME_IF_EXISTS:omnitrace::omnitrace-compile-options>
$<TARGET_NAME_IF_EXISTS:hip::host> $<TARGET_NAME_IF_EXISTS:hip::device>)
PRIVATE
$<TARGET_NAME_IF_EXISTS:rocprofiler-systems::rocprofiler-systems-compile-options>
$<TARGET_NAME_IF_EXISTS:hip::host>
$<TARGET_NAME_IF_EXISTS:hip::device>)
else()
target_compile_options(transpose PRIVATE -W -Wall)
endif()
@@ -73,12 +75,12 @@ endif()
if(NOT CMAKE_CXX_COMPILER_IS_HIPCC AND HIPCC_EXECUTABLE)
# defined in MacroUtilities.cmake
omnitrace_custom_compilation(COMPILER ${HIPCC_EXECUTABLE} TARGET transpose)
rocprofiler_systems_custom_compilation(COMPILER ${HIPCC_EXECUTABLE} TARGET transpose)
endif()
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
TARGETS transpose
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
@@ -1,5 +1,5 @@
/*
Copyright (c) 2015-2020 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2015-2024 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -221,7 +221,7 @@ main(int argc, char** argv)
#else
(void) size;
#endif
// this is a temporary workaround in omnitrace when HIP + MPI is enabled
// this is a temporary workaround in rocprof-sys when HIP + MPI is enabled
int ndevice = 0;
int devid = rank;
HIP_API_CALL(hipGetDeviceCount(&ndevice));
@@ -1,27 +1,29 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-user-api-example LANGUAGES CXX)
project(rocprofiler-systems-user-api-example LANGUAGES CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
if(ROCPROFSYS_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
if(${PROJECT_NAME} IN_LIST ROCPROFSYS_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
ROCPROFSYS_DISABLE_EXAMPLES)
return()
endif()
endif()
set(CMAKE_BUILD_TYPE "Debug")
find_package(Threads REQUIRED)
if(NOT TARGET omnitrace::omnitrace-user-library)
find_package(omnitrace REQUIRED COMPONENTS user)
if(NOT TARGET rocprofiler-systems::rocprofiler-systems-user-library)
find_package(rocprofiler-systems REQUIRED COMPONENTS user)
endif()
add_executable(user-api user-api.cpp)
target_link_libraries(user-api PRIVATE Threads::Threads omnitrace::omnitrace-user-library)
target_link_libraries(
user-api PRIVATE Threads::Threads
rocprofiler-systems::rocprofiler-systems-user-library)
if(OMNITRACE_INSTALL_EXAMPLES)
if(ROCPROFSYS_INSTALL_EXAMPLES)
install(
TARGETS user-api
DESTINATION bin
COMPONENT omnitrace-examples)
COMPONENT rocprofiler-systems-examples)
endif()
@@ -1,7 +1,7 @@
#include "omnitrace/categories.h"
#include "omnitrace/types.h"
#include <omnitrace/user.h>
#include <rocprofiler-systems/categories.h>
#include <rocprofiler-systems/types.h>
#include <rocprofiler-systems/user.h>
#include <atomic>
#include <cassert>
@@ -26,52 +26,52 @@ custom_push_region(const char* name);
namespace
{
omnitrace_user_callbacks_t custom_callbacks = OMNITRACE_USER_CALLBACKS_INIT;
omnitrace_user_callbacks_t original_callbacks = OMNITRACE_USER_CALLBACKS_INIT;
rocprofsys_user_callbacks_t custom_callbacks = ROCPROFSYS_USER_CALLBACKS_INIT;
rocprofsys_user_callbacks_t original_callbacks = ROCPROFSYS_USER_CALLBACKS_INIT;
} // namespace
int
main(int argc, char** argv)
{
custom_callbacks.push_region = &custom_push_region;
omnitrace_user_configure(OMNITRACE_USER_UNION_CONFIG, custom_callbacks,
&original_callbacks);
rocprofsys_user_configure(ROCPROFSYS_USER_UNION_CONFIG, custom_callbacks,
&original_callbacks);
omnitrace_user_push_region(argv[0]);
omnitrace_user_push_region("initialization");
rocprofsys_user_push_region(argv[0]);
rocprofsys_user_push_region("initialization");
size_t nthread = std::min<size_t>(16, std::thread::hardware_concurrency());
size_t nitr = 50000;
long nfib = 10;
if(argc > 1) nfib = atol(argv[1]);
if(argc > 2) nthread = atol(argv[2]);
if(argc > 3) nitr = atol(argv[3]);
omnitrace_user_pop_region("initialization");
rocprofsys_user_pop_region("initialization");
printf("[%s] Threads: %zu\n[%s] Iterations: %zu\n[%s] fibonacci(%li)...\n", argv[0],
nthread, argv[0], nitr, argv[0], nfib);
omnitrace_user_push_region("thread_creation");
rocprofsys_user_push_region("thread_creation");
std::vector<std::thread> threads{};
threads.reserve(nthread);
// disable instrumentation for child threads
omnitrace_user_stop_thread_trace();
rocprofsys_user_stop_thread_trace();
for(size_t i = 0; i < nthread; ++i)
{
threads.emplace_back(&run, nitr, nfib);
}
// re-enable instrumentation
omnitrace_user_start_thread_trace();
omnitrace_user_pop_region("thread_creation");
rocprofsys_user_start_thread_trace();
rocprofsys_user_pop_region("thread_creation");
omnitrace_user_push_region("thread_wait");
rocprofsys_user_push_region("thread_wait");
for(auto& itr : threads)
itr.join();
omnitrace_user_pop_region("thread_wait");
rocprofsys_user_pop_region("thread_wait");
run(nitr, nfib);
printf("[%s] fibonacci(%li) x %lu = %li\n", argv[0], nfib, nthread, total.load());
omnitrace_user_pop_region(argv[0]);
rocprofsys_user_pop_region(argv[0]);
return 0;
}
@@ -90,19 +90,19 @@ fib(long n)
void
run(size_t nitr, long n)
{
omnitrace_user_push_region(RUN_LABEL);
rocprofsys_user_push_region(RUN_LABEL);
long local = 0;
for(size_t i = 0; i < nitr; ++i)
local += fib(n);
total += local;
omnitrace_user_pop_region(RUN_LABEL);
rocprofsys_user_pop_region(RUN_LABEL);
}
int
custom_push_region(const char* name)
{
if(!original_callbacks.push_region || !original_callbacks.push_annotated_region)
return OMNITRACE_USER_ERROR_NO_BINDING;
return ROCPROFSYS_USER_ERROR_NO_BINDING;
printf("Pushing custom region :: %s\n", name);
@@ -113,13 +113,13 @@ custom_push_region(const char* name)
char _buff[1024];
if(_err != 0) _msg = strerror_r(_err, _buff, sizeof(_buff));
omnitrace_annotation_t _annotations[] = {
{ "errno", OMNITRACE_INT32, &_err }, { "strerror", OMNITRACE_STRING, _msg }
rocprofsys_annotation_t _annotations[] = {
{ "errno", ROCPROFSYS_INT32, &_err }, { "strerror", ROCPROFSYS_STRING, _msg }
};
errno = 0; // reset errno
return (*original_callbacks.push_annotated_region)(
name, _annotations, sizeof(_annotations) / sizeof(omnitrace_annotation_t));
name, _annotations, sizeof(_annotations) / sizeof(rocprofsys_annotation_t));
}
return (*original_callbacks.push_region)(name);