From 351d825a8d721ef3fbb7edf9f3cd19f85f6e1365 Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Tue, 22 Aug 2023 13:29:11 -0500 Subject: [PATCH] Initial skeleton (revised) (#16) * [0/N] git submodules * [1/N] Update cmake, gitignore, external - clang-tidy file - update .gitignore - update main CMakeLists.txt - update external/CMakeLists.txt - update rocprofiler_config_interfaces.cmake - update rocprofiler_formatting.cmake - update rocprofiler_interfaces.cmake - update rocprofiler_linting.cmake - update rocprofiler_options.cmake - update rocprofiler_utilities.cmake * [2/N] Update rocprofiler/config.h - update to work with new rocprofiler.h * [3/N] Update source/lib/rocprofiler/hsa - hsa-types.h: static asserts - hsa.cpp: copyTables scope - hsa.gen.cpp: ACTIVITY_DOMAIN_HSA_API -> ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API - rename some files - add rocprofiler_ prefix to types and enums - HSA_API_TABLE_LOOKUP_DEFINITION macro - get_saved_table() -> get_table() * [4/N] Update source/lib/common - CMake: change target_link_libraries - defines.hpp: remove ppdefs defined in include/rocprofiler/defines.h * [5/N] Update source/lib/rocprofiler - updates due to changes in rocprofiler.h - rocprofiler_config.cpp: remove unions which are now defined in include/rocprofiler - CMakeLists.txt: rocprofiler.cpp and public hsa-runtime and hip libraries - rocprofiler.cpp: dummy implementations for: - rocprofiler_query_available_agents - rocprofiler_create_context - rocprofiler_start_context - rocprofiler_stop_context - rocprofiler_flush_buffer - rocprofiler_destroy_buffer * [6/N] Update license - replace stale LBNL license * [7/N] CMake format --- .clang-tidy | 55 + .gitignore | 3 + .gitmodules | 6 + CMakeLists.txt | 6 + cmake/rocprofiler_config_interfaces.cmake | 10 +- cmake/rocprofiler_formatting.cmake | 14 +- cmake/rocprofiler_interfaces.cmake | 45 +- cmake/rocprofiler_linting.cmake | 18 +- cmake/rocprofiler_options.cmake | 53 +- cmake/rocprofiler_utilities.cmake | 61 +- external/CMakeLists.txt | 87 +- external/fmt | 1 + external/glog | 1 + source/include/rocprofiler/config.h | 42 +- source/lib/common/CMakeLists.txt | 11 +- .../common/container/atomic_ring_buffer.cpp | 4 +- .../common/container/atomic_ring_buffer.hpp | 4 +- source/lib/common/container/ring_buffer.cpp | 4 +- source/lib/common/container/ring_buffer.hpp | 4 +- source/lib/common/defines.hpp | 5 +- source/lib/common/log.hpp | 10 +- source/lib/common/units.hpp | 36 +- source/lib/rocprofiler/CMakeLists.txt | 23 +- source/lib/rocprofiler/config_helpers.hpp | 22 +- source/lib/rocprofiler/config_internal.hpp | 4 +- source/lib/rocprofiler/hsa/CMakeLists.txt | 2 +- .../hsa/{hsa-defines.hpp => defines.hpp} | 34 +- source/lib/rocprofiler/hsa/hsa-types.h | 1456 ------- source/lib/rocprofiler/hsa/hsa.cpp | 156 +- source/lib/rocprofiler/hsa/hsa.def.cpp | 224 + source/lib/rocprofiler/hsa/hsa.gen.cpp | 217 - source/lib/rocprofiler/hsa/hsa.hpp | 39 +- .../hsa/{hsa-ostream.hpp => ostream.hpp} | 0 source/lib/rocprofiler/hsa/types.hpp | 58 + .../hsa/{hsa-utils.hpp => utils.hpp} | 0 source/lib/rocprofiler/rocprofiler.cpp | 147 + source/lib/rocprofiler/rocprofiler_config.cpp | 3753 +---------------- source/lib/rocprofiler/tracer.hpp | 8 +- 38 files changed, 937 insertions(+), 5686 deletions(-) create mode 100644 .clang-tidy create mode 160000 external/fmt create mode 160000 external/glog rename source/lib/rocprofiler/hsa/{hsa-defines.hpp => defines.hpp} (89%) delete mode 100644 source/lib/rocprofiler/hsa/hsa-types.h create mode 100644 source/lib/rocprofiler/hsa/hsa.def.cpp delete mode 100644 source/lib/rocprofiler/hsa/hsa.gen.cpp rename source/lib/rocprofiler/hsa/{hsa-ostream.hpp => ostream.hpp} (100%) create mode 100644 source/lib/rocprofiler/hsa/types.hpp rename source/lib/rocprofiler/hsa/{hsa-utils.hpp => utils.hpp} (100%) create mode 100644 source/lib/rocprofiler/rocprofiler.cpp diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000000..7714903656 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,55 @@ +--- +Checks: "-*,\ +misc-*,\ +-misc-incorrect-roundings,\ +-misc-macro-parentheses,\ +-misc-misplaced-widening-cast,\ +-misc-static-assert,\ +-misc-no-recursion,\ +-misc-non-private-member-variables-in-classes,\ +-misc-include-cleaner,\ +-misc-const-correctness,\ +modernize-*,\ +-modernize-deprecated-headers,\ +-modernize-raw-string-literal,\ +-modernize-return-braced-init-list,\ +-modernize-use-transparent-functors,\ +-modernize-use-trailing-return-type,\ +-modernize-avoid-c-arrays,\ +-modernize-redundant-void-arg,\ +-modernize-use-using,\ +-modernize-use-auto,\ +-modernize-concat-nested-namespaces,\ +-modernize-use-nodiscard,\ +-modernize-macro-to-enum,\ +-modernize-type-traits,\ +performance-*,\ +readability-*,\ +-readability-function-size,\ +-readability-identifier-naming,\ +-readability-implicit-bool-cast,\ +-readability-inconsistent-declaration-parameter-name,\ +-readability-named-parameter,\ +-readability-magic-numbers,\ +-readability-redundant-declaration,\ +-readability-redundant-member-init,\ +-readability-simplify-boolean-expr,\ +-readability-uppercase-literal-suffix,\ +-readability-braces-around-statements,\ +-readability-avoid-const-params-in-decls,\ +-readability-else-after-return,\ +-readability-isolate-declaration,\ +-readability-redundant-string-cstr,\ +-readability-static-accessed-through-instance,\ +-readability-const-return-type,\ +-readability-redundant-access-specifiers,\ +-readability-function-cognitive-complexity,\ +-readability-identifier-length,\ +-readability-use-anyofallof,\ +" +CheckOptions: + - key: readability-braces-around-statements.ShortStatementLines + value: '2' + - key: readability-implicit-bool-conversion.AllowPointerConditions + value: '1' +... diff --git a/.gitignore b/.gitignore index a34c72785f..625ba9f83a 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,7 @@ *.app # Build directories +/compile_commands.json /build* +/.cache +/.vscode diff --git a/.gitmodules b/.gitmodules index bab1865156..11275350a8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "external/googletest"] path = external/googletest url = https://github.com/google/googletest.git +[submodule "external/glog"] + path = external/glog + url = https://github.com/google/glog.git +[submodule "fmt"] + path = external/fmt + url = https://github.com/fmtlib/fmt.git diff --git a/CMakeLists.txt b/CMakeLists.txt index aa986460c5..037f8d864c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,7 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${PROJECT_SOURCE_DIR}/cmake/Mo ${CMAKE_MODULE_PATH}) include(GNUInstallDirs) # install directories +set(CMAKE_INSTALL_LIBDIR "lib") # rocm doesn't use lib64 include(rocprofiler_utilities) # various functions/macros include(rocprofiler_interfaces) # interface libraries @@ -73,6 +74,9 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}") +enable_testing() +include(CTest) + add_subdirectory(external) add_subdirectory(source) @@ -87,3 +91,5 @@ endif() # include(rocprofiler_config_install) include(rocprofiler_config_packaging) + +rocprofiler_print_features() diff --git a/cmake/rocprofiler_config_interfaces.cmake b/cmake/rocprofiler_config_interfaces.cmake index d61a43b17e..c5b3abb65f 100644 --- a/cmake/rocprofiler_config_interfaces.cmake +++ b/cmake/rocprofiler_config_interfaces.cmake @@ -9,12 +9,16 @@ include_guard(DIRECTORY) target_include_directories( rocprofiler-headers - INTERFACE $ + INTERFACE $ + $ $ $) -# include threading because of rooflines -target_link_libraries(rocprofiler-headers INTERFACE rocprofiler::rocprofiler-threading) +target_compile_definitions( + rocprofiler-headers + INTERFACE $ $ + $ + $) # ensure the env overrides the appending /opt/rocm later string(REPLACE ":" ";" CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH};${CMAKE_PREFIX_PATH}") diff --git a/cmake/rocprofiler_formatting.cmake b/cmake/rocprofiler_formatting.cmake index fb372905b8..fa68f575f4 100644 --- a/cmake/rocprofiler_formatting.cmake +++ b/cmake/rocprofiler_formatting.cmake @@ -42,12 +42,14 @@ if(ROCPROFILER_CLANG_FORMAT_EXE set(${_TYPE}) endforeach() file(GLOB_RECURSE header_files ${PROJECT_SOURCE_DIR}/${_DIR}/*.h - ${PROJECT_SOURCE_DIR}/${_DIR}/*.hpp) + ${PROJECT_SOURCE_DIR}/${_DIR}/*.hpp ${PROJECT_SOURCE_DIR}/${_DIR}/*.h.in + ${PROJECT_SOURCE_DIR}/${_DIR}/*.hpp.in) file(GLOB_RECURSE source_files ${PROJECT_SOURCE_DIR}/${_DIR}/*.c ${PROJECT_SOURCE_DIR}/${_DIR}/*.cpp) file(GLOB_RECURSE cmake_files ${PROJECT_SOURCE_DIR}/${_DIR}/*CMakeLists.txt ${PROJECT_SOURCE_DIR}/${_DIR}/*.cmake) - file(GLOB_RECURSE python_files ${PROJECT_SOURCE_DIR}/${_DIR}/*.py) + file(GLOB_RECURSE python_files ${PROJECT_SOURCE_DIR}/${_DIR}/*.py + ${PROJECT_SOURCE_DIR}/${_DIR}/*.py.in) foreach(_TYPE header_files source_files cmake_files python_files) list(APPEND rocp_${_TYPE} ${${_TYPE}}) endforeach() @@ -69,12 +71,12 @@ if(ROCPROFILER_CLANG_FORMAT_EXE ) endif() - if(ROCPROFILER_BLACK_FORMAT_EXE) + if(ROCPROFILER_BLACK_FORMAT_EXE AND rocp_python_files) add_custom_target( format-rocprofiler-python ${ROCPROFILER_BLACK_FORMAT_EXE} -q ${rocp_python_files} COMMENT - "[rocprofiler] Running Python formatter ${ROCPROFILER_BLACK_FORMAT_EXE}..." + "[rocprofiler] Running python formatter ${ROCPROFILER_BLACK_FORMAT_EXE}..." ) endif() @@ -83,7 +85,7 @@ if(ROCPROFILER_CLANG_FORMAT_EXE format-rocprofiler-cmake ${ROCPROFILER_CMAKE_FORMAT_EXE} -i ${rocp_cmake_files} COMMENT - "[rocprofiler] Running CMake formatter ${ROCPROFILER_CMAKE_FORMAT_EXE}..." + "[rocprofiler] Running cmake formatter ${ROCPROFILER_CMAKE_FORMAT_EXE}..." ) endif() @@ -94,7 +96,7 @@ if(ROCPROFILER_CLANG_FORMAT_EXE endif() endforeach() - foreach(_TYPE source python) + foreach(_TYPE source python cmake) if(TARGET format-rocprofiler-${_TYPE}) add_dependencies(format format-rocprofiler-${_TYPE}) endif() diff --git a/cmake/rocprofiler_interfaces.cmake b/cmake/rocprofiler_interfaces.cmake index 360835d78b..1b24a11293 100644 --- a/cmake/rocprofiler_interfaces.cmake +++ b/cmake/rocprofiler_interfaces.cmake @@ -12,33 +12,40 @@ include(rocprofiler_utilities) rocprofiler_add_interface_library( rocprofiler-headers "Provides minimal set of include flags to compile with rocprofiler") -rocprofiler_add_interface_library(rocprofiler-build-flags - "Provides generalized build flags for rocprofiler") -rocprofiler_add_interface_library(rocprofiler-threading "Enables multithreading support") -rocprofiler_add_interface_library(rocprofiler-perfetto "Enables Perfetto support") -rocprofiler_add_interface_library(rocprofiler-compile-definitions "Compile definitions") +rocprofiler_add_interface_library( + rocprofiler-build-flags "Provides generalized build flags for rocprofiler" INTERNAL) +rocprofiler_add_interface_library(rocprofiler-threading "Enables multithreading support" + INTERNAL) +rocprofiler_add_interface_library(rocprofiler-perfetto "Enables Perfetto support" + INTERNAL) +rocprofiler_add_interface_library(rocprofiler-compile-definitions "Compile definitions" + INTERNAL) rocprofiler_add_interface_library(rocprofiler-static-libgcc - "Link to static version of libgcc") + "Link to static version of libgcc" INTERNAL) rocprofiler_add_interface_library(rocprofiler-static-libstdcxx - "Link to static version of libstdc++") -rocprofiler_add_interface_library(rocprofiler-developer-flags - "Compiler flags for developers (more warnings, etc.)") + "Link to static version of libstdc++" INTERNAL) +rocprofiler_add_interface_library( + rocprofiler-developer-flags "Compiler flags for developers (more warnings, etc.)" + INTERNAL) rocprofiler_add_interface_library(rocprofiler-debug-flags - "Compiler flags for more debug info") + "Compiler flags for more debug info" INTERNAL) rocprofiler_add_interface_library(rocprofiler-release-flags - "Compiler flags for more debug info") + "Compiler flags for more debug info" INTERNAL) rocprofiler_add_interface_library(rocprofiler-stack-protector - "Adds stack-protector compiler flags") -rocprofiler_add_interface_library(rocprofiler-memcheck INTERFACE) + "Adds stack-protector compiler flags" INTERNAL) +rocprofiler_add_interface_library(rocprofiler-memcheck INTERFACE INTERNAL) # # interfaces for libraries # rocprofiler_add_interface_library(rocprofiler-dl - "Build flags for dynamic linking library") -rocprofiler_add_interface_library(rocprofiler-rt "Build flags for runtime library") -rocprofiler_add_interface_library(rocprofiler-hip "HIP library") -rocprofiler_add_interface_library(rocprofiler-hsa-runtime "HSA runtime library") -rocprofiler_add_interface_library(rocprofiler-amd-comgr "AMD comgr library") -rocprofiler_add_interface_library(rocprofiler-googletest "Google Test library" INTERNAL) + "Build flags for dynamic linking library" INTERNAL) +rocprofiler_add_interface_library(rocprofiler-rt "Build flags for runtime library" + INTERNAL) +rocprofiler_add_interface_library(rocprofiler-hip "HIP library" INTERNAL) +rocprofiler_add_interface_library(rocprofiler-hsa-runtime "HSA runtime library" INTERNAL) +rocprofiler_add_interface_library(rocprofiler-amd-comgr "AMD comgr library" INTERNAL) +rocprofiler_add_interface_library(rocprofiler-gtest "Google Test library" INTERNAL) +rocprofiler_add_interface_library(rocprofiler-glog "Google Log library" INTERNAL) +rocprofiler_add_interface_library(rocprofiler-fmt "C++ format string library" INTERNAL) rocprofiler_add_interface_library(rocprofiler-stdcxxfs "C++ filesystem library" INTERNAL) diff --git a/cmake/rocprofiler_linting.cmake b/cmake/rocprofiler_linting.cmake index 4858e1ef23..f2e93d6273 100644 --- a/cmake/rocprofiler_linting.cmake +++ b/cmake/rocprofiler_linting.cmake @@ -6,7 +6,17 @@ include_guard(GLOBAL) # # ----------------------------------------------------------------------------------------# -find_program(ROCPROFILER_CLANG_TIDY_COMMAND NAMES clang-tidy) +find_program( + ROCPROFILER_CLANG_TIDY_COMMAND + NAMES clang-tidy-18 + clang-tidy-17 + clang-tidy-16 + clang-tidy-15 + clang-tidy-14 + clang-tidy-13 + clang-tidy-12 + clang-tidy-11 + clang-tidy) macro(ROCPROFILER_ACTIVATE_CLANG_TIDY) if(ROCPROFILER_ENABLE_CLANG_TIDY) @@ -16,8 +26,10 @@ macro(ROCPROFILER_ACTIVATE_CLANG_TIDY) "ROCPROFILER_ENABLE_CLANG_TIDY is ON but clang-tidy is not found!") endif() - set(CMAKE_CXX_CLANG_TIDY ${ROCPROFILER_CLANG_TIDY_COMMAND} - -header-filter=${PROJECT_SOURCE_DIR}/.*) + set(CMAKE_CXX_CLANG_TIDY + ${ROCPROFILER_CLANG_TIDY_COMMAND} + -header-filter=${PROJECT_SOURCE_DIR}/source/.* + --warnings-as-errors=*,-misc-header-include-cycle) # Create a preprocessor definition that depends on .clang-tidy content so the # compile command will change when .clang-tidy changes. This ensures that a diff --git a/cmake/rocprofiler_options.cmake b/cmake/rocprofiler_options.cmake index 6632a7d319..e55f2e3c75 100644 --- a/cmake/rocprofiler_options.cmake +++ b/cmake/rocprofiler_options.cmake @@ -3,23 +3,41 @@ # # Configure miscellaneous settings # -# standard cmake options -rocprofiler_add_option(BUILD_SHARED_LIBS "Build shared libraries" ON) -rocprofiler_add_option(BUILD_STATIC_LIBS "Build static libraries" OFF) -rocprofiler_add_option(CMAKE_POSITION_INDEPENDENT_CODE "Build position independent code" - ON) +include_guard(GLOBAL) -# export compile commands in the project +# export compile commands of the project. Many IDEs want the compile_commands.json in root +# directory so run ln -s /compile_commands.json set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +# C settings set(CMAKE_C_STANDARD 11) set(CMAKE_C_EXTENSIONS OFF) set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_VISIBILITY_PRESET "hidden") +# C++ settings set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_VISIBILITY_PRESET "hidden") +# general settings affecting build +set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) +set(CMAKE_UNITY_BUILD OFF) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) -rocprofiler_add_option(ROCPROFILER_BUILD_TESTS "Enable building the tests" OFF) -rocprofiler_add_option(ROCPROFILER_BUILD_SAMPLES "Enable building the code samples" OFF) +rocprofiler_add_feature(CMAKE_BUILD_TYPE "Build type") +rocprofiler_add_feature(CMAKE_INSTALL_PREFIX "Install prefix") + +# standard cmake options +rocprofiler_add_option(BUILD_SHARED_LIBS "Build shared libraries" ON) +# rocprofiler_add_option(BUILD_STATIC_LIBS "Build static libraries" OFF) + +rocprofiler_add_option( + ROCPROFILER_BUILD_CI "Enable continuous integration default values for options" OFF + ADVANCED) + +rocprofiler_add_option(ROCPROFILER_BUILD_TESTS "Enable building the tests" + ${ROCPROFILER_BUILD_CI}) +rocprofiler_add_option(ROCPROFILER_BUILD_SAMPLES "Enable building the code samples" + ${ROCPROFILER_BUILD_CI}) # CLI and FILE plugins are always built foreach(_PLUGIN "ATT" "CTF" "PERFETTO") @@ -27,19 +45,26 @@ foreach(_PLUGIN "ATT" "CTF" "PERFETTO") "Enable building the ${_PLUGIN} plugin" ON) endforeach() +rocprofiler_add_option(ROCPROFILER_BUILD_FMT "Enable building fmt library internally" ON) +rocprofiler_add_option(ROCPROFILER_BUILD_GLOG + "Enable building glog (Google logging) library internally" ON) +if(ROCPROFILER_BUILD_TESTS) + rocprofiler_add_option( + ROCPROFILER_BUILD_GTEST + "Enable building gtest (Google testing) library internally" ON ADVANCED) +endif() + rocprofiler_add_option(ROCPROFILER_DEBUG_TRACE "Enable debug tracing" OFF ADVANCED) rocprofiler_add_option(ROCPROFILER_LD_AQLPROFILE "Enable direct loading of AQL-profile HSA extension" OFF ADVANCED) -rocprofiler_add_option(ROCPROFILER_BUILD_CI "Enable continuous integration additions" OFF - ADVANCED) rocprofiler_add_option(ROCPROFILER_ENABLE_CLANG_TIDY "Enable clang-tidy checks" OFF ADVANCED) -rocprofiler_add_option(ROCPROFILER_BUILD_WERROR "Any compiler warnings are errors" OFF - ADVANCED) rocprofiler_add_option( ROCPROFILER_BUILD_DEVELOPER "Extra build flags for development like -Werror" ${ROCPROFILER_BUILD_CI} ADVANCED) +rocprofiler_add_option(ROCPROFILER_BUILD_WERROR "Any compiler warnings are errors" + ${ROCPROFILER_BUILD_CI} ADVANCED) rocprofiler_add_option(ROCPROFILER_BUILD_RELEASE "Build with minimal debug info" OFF ADVANCED) rocprofiler_add_option(ROCPROFILER_BUILD_DEBUG "Build with extra debug info" OFF ADVANCED) @@ -48,10 +73,10 @@ rocprofiler_add_option(ROCPROFILER_BUILD_STATIC_LIBGCC rocprofiler_add_option(ROCPROFILER_BUILD_STATIC_LIBSTDCXX "Build with -static-libstdc++ if possible" OFF ADVANCED) rocprofiler_add_option(ROCPROFILER_BUILD_STACK_PROTECTOR "Build with -fstack-protector" - OFF ADVANCED) + ON ADVANCED) # In the future, we will do this even with clang-tidy enabled -if(ROCPROFILER_BUILD_CI AND NOT ROCPROFILER_ENABLE_CLANG_TIDY) +if(ROCPROFILER_BUILD_CI AND NOT ROCPROFILER_BUILD_WERROR) message(STATUS "Forcing ROCPROFILER_BUILD_WERROR=ON because ROCPROFILER_BUILD_CI=ON") set(ROCPROFILER_BUILD_WERROR ON diff --git a/cmake/rocprofiler_utilities.cmake b/cmake/rocprofiler_utilities.cmake index 44b37af6e3..da9ee7c618 100644 --- a/cmake/rocprofiler_utilities.cmake +++ b/cmake/rocprofiler_utilities.cmake @@ -204,11 +204,6 @@ function(ROCPROFILER_CHECKOUT_GIT_SUBMODULE) set(CHECKOUT_TEST_FILE "CMakeLists.txt") endif() - # default assumption - if(NOT CHECKOUT_REPO_BRANCH) - set(CHECKOUT_REPO_BRANCH "master") - endif() - find_package(Git) set(_DIR "${CHECKOUT_WORKING_DIRECTORY}/${CHECKOUT_RELATIVE_PATH}") # ensure the (possibly empty) directory exists @@ -267,7 +262,9 @@ function(ROCPROFILER_CHECKOUT_GIT_SUBMODULE) if(NOT _TEST_FILE_EXISTS AND _HAS_REPO_URL) message( - STATUS "Checking out '${CHECKOUT_REPO_URL}' @ '${CHECKOUT_REPO_BRANCH}'...") + STATUS + "Cloning '${CHECKOUT_REPO_URL}' into ${CHECKOUT_WORKING_DIRECTORY}/${CHECKOUT_RELATIVE_PATH}..." + ) # remove the existing directory if(EXISTS "${_DIR}") @@ -276,11 +273,33 @@ function(ROCPROFILER_CHECKOUT_GIT_SUBMODULE) # perform the checkout execute_process( - COMMAND - ${GIT_EXECUTABLE} clone -b ${CHECKOUT_REPO_BRANCH} - ${CHECKOUT_ADDITIONAL_CMDS} ${CHECKOUT_REPO_URL} ${CHECKOUT_RELATIVE_PATH} + COMMAND ${GIT_EXECUTABLE} clone ${CHECKOUT_ADDITIONAL_CMDS} + ${CHECKOUT_REPO_URL} ${CHECKOUT_RELATIVE_PATH} WORKING_DIRECTORY ${CHECKOUT_WORKING_DIRECTORY} - RESULT_VARIABLE RET) + RESULT_VARIABLE RET_CLONE) + + if(NOT RET_CLONE EQUAL 0) + message( + SEND_ERROR + "Failed to clone ${CHECKOUT_REPO_URL} into ${CHECKOUT_WORKING_DIRECTORY}/${CHECKOUT_RELATIVE_PATH}" + ) + return() + endif() + + if(CHECKOUT_REPO_BRANCH) + execute_process( + COMMAND ${GIT_EXECUTABLE} checkout ${CHECKOUT_REPO_BRANCH} + WORKING_DIRECTORY ${CHECKOUT_WORKING_DIRECTORY}/${CHECKOUT_RELATIVE_PATH} + RESULT_VARIABLE RET_BRANCH) + + if(NOT RET_BRANCH EQUAL 0) + message( + SEND_ERROR + "Failed to checkout '${CHECKOUT_REPO_BRANCH}' for ${CHECKOUT_REPO_URL} in ${CHECKOUT_WORKING_DIRECTORY}/${CHECKOUT_RELATIVE_PATH}" + ) + return() + endif() + endif() # perform the submodule update if(CHECKOUT_RECURSIVE @@ -289,20 +308,17 @@ function(ROCPROFILER_CHECKOUT_GIT_SUBMODULE) execute_process( COMMAND ${GIT_EXECUTABLE} submodule update --init ${_RECURSE} WORKING_DIRECTORY ${_DIR} - RESULT_VARIABLE RET) + RESULT_VARIABLE RET_RECURSIVE) + if(NOT RET_RECURSIVE EQUAL 0) + message( + SEND_ERROR + "Failed to update submodules for ${CHECKOUT_REPO_URL} in ${CHECKOUT_WORKING_DIRECTORY}/${CHECKOUT_RELATIVE_PATH}" + ) + return() + endif() endif() - # check the return code - if(RET GREATER 0) - set(_CMD - "${GIT_EXECUTABLE} clone -b ${CHECKOUT_REPO_BRANCH} - ${CHECKOUT_ADDITIONAL_CMDS} ${CHECKOUT_REPO_URL} ${CHECKOUT_RELATIVE_PATH}" - ) - message(STATUS "function(rocprofiler_checkout_git_submodule) failed.") - message(FATAL_ERROR "Command: \"${_CMD}\"") - else() - set(_TEST_FILE_EXISTS ON) - endif() + set(_TEST_FILE_EXISTS ON) endif() if(NOT EXISTS "${_TEST_FILE}" OR NOT _TEST_FILE_EXISTS) @@ -310,7 +326,6 @@ function(ROCPROFILER_CHECKOUT_GIT_SUBMODULE) FATAL_ERROR "Error checking out submodule: '${CHECKOUT_RELATIVE_PATH}' to '${_DIR}'") endif() - endfunction() # ----------------------------------------------------------------------------------------# diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 558b521d88..a1fe082273 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -3,27 +3,78 @@ # External dependencies # # +set(BUILD_TESTING OFF) if(ROCPROFILER_BUILD_TESTS) - set(INSTALL_GTEST - OFF - CACHE BOOL "") - set(BUILD_GMOCK - OFF - CACHE BOOL "") + if(ROCPROFILER_BUILD_GTEST) + set(INSTALL_GTEST + OFF + CACHE BOOL "") + set(BUILD_GMOCK + OFF + CACHE BOOL "") - add_subdirectory(googletest EXCLUDE_FROM_ALL) + add_subdirectory(googletest EXCLUDE_FROM_ALL) - if(NOT TARGET GTest::gtest) - message(FATAL_ERROR "missing GTest::gtest") + if(NOT TARGET GTest::gtest) + message(FATAL_ERROR "missing GTest::gtest") + endif() + + target_link_libraries(rocprofiler-gtest INTERFACE GTest::gtest) + target_include_directories( + rocprofiler-gtest SYSTEM + INTERFACE ${CMAKE_CURRENT_LIST_DIR}/googletest/googletest/include) + + mark_as_advanced(INSTALL_GTEST) + mark_as_advanced(BUILD_GMOCK) + mark_as_advanced(GTEST_HAS_ABSL) + else() + find_package(GTest REQUIRED) + target_link_libraries(rocprofiler-gtest INTERFACE GTest::gtest) endif() - - target_link_libraries(rocprofiler-googletest INTERFACE GTest::gtest) - target_include_directories( - rocprofiler-googletest SYSTEM - INTERFACE ${CMAKE_CURRENT_LSIT_DIR}/googletest/googletest/include) - - mark_as_advanced(INSTALL_GTEST) - mark_as_advanced(BUILD_GMOCK) - mark_as_advanced(GTEST_HAS_ABSL) +endif() + +if(ROCPROFILER_BUILD_GLOG) + # checkout submodule if not already checked out or clone repo if no .gitmodules file + rocprofiler_checkout_git_submodule( + RECURSIVE + RELATIVE_PATH external/glog + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + REPO_URL https://github.com/google/glog.git + REPO_BRANCH "master") + + # May want to use GFLAGS in the future + set(WITH_GFLAGS OFF) + set(BUILD_SHARED_LIBS OFF) + add_subdirectory(glog EXCLUDE_FROM_ALL) + + target_link_libraries(rocprofiler-glog INTERFACE $) + target_include_directories( + rocprofiler-glog SYSTEM + INTERFACE $ + $) +else() + find_package(glog REQUIRED) + target_link_libraries(rocprofiler-glog INTERFACE glog::glog) +endif() + +if(ROCPROFILER_BUILD_FMT) + # checkout submodule if not already checked out or clone repo if no .gitmodules file + rocprofiler_checkout_git_submodule( + RECURSIVE + RELATIVE_PATH external/fmt + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + REPO_URL https://github.com/fmtlib/fmt.git + REPO_BRANCH "master") + + set(FMT_TEST OFF) + add_subdirectory(fmt EXCLUDE_FROM_ALL) + + target_link_libraries(rocprofiler-fmt INTERFACE $) + target_include_directories( + rocprofiler-fmt SYSTEM + INTERFACE $) +else() + find_package(fmt REQUIRED) + target_link_libraries(rocprofiler-fmt INTERFACE fmt::fmt) endif() diff --git a/external/fmt b/external/fmt new file mode 160000 index 0000000000..0bffed8957 --- /dev/null +++ b/external/fmt @@ -0,0 +1 @@ +Subproject commit 0bffed89579ac8a210379fd640569e4b75fe28c8 diff --git a/external/glog b/external/glog new file mode 160000 index 0000000000..3a0d4d22c5 --- /dev/null +++ b/external/glog @@ -0,0 +1 @@ +Subproject commit 3a0d4d22c5ae0b9a2216988411cfa6bf860cc372 diff --git a/source/include/rocprofiler/config.h b/source/include/rocprofiler/config.h index 2cd260c85d..be988ef4ff 100644 --- a/source/include/rocprofiler/config.h +++ b/source/include/rocprofiler/config.h @@ -1,3 +1,24 @@ +// MIT License +// +// Copyright (c) 2023 ROCm Developer Tools +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. #pragma once @@ -8,9 +29,10 @@ extern "C" { #endif -#define ROCPROFILER_API_VERSION_ID 1 -#define ROCPROFILER_DOMAIN_OPS_MAX 512 -#define ROCPROFILER_DOMAIN_OPS_RESERVED ((ROCPROFILER_DOMAIN_OPS_MAX * ACTIVITY_DOMAIN_NUMBER / 8)) +#define ROCPROFILER_API_VERSION_ID 1 +#define ROCPROFILER_DOMAIN_OPS_MAX 512 +#define ROCPROFILER_DOMAIN_OPS_RESERVED \ + ((ROCPROFILER_DOMAIN_OPS_MAX * ROCPROFILER_TRACER_ACTIVITY_DOMAIN_LAST / 8)) typedef uint64_t (*rocprofiler_external_cid_cb_t)(rocprofiler_tracer_activity_domain_t, uint32_t, @@ -31,9 +53,9 @@ struct rocprofiler_correlation_config /// domain they want to trace struct rocprofiler_domain_config { - rocprofiler_sync_callback_t callback; - char reserved0[sizeof(uint64_t)]; - char reserved1[ROCPROFILER_DOMAIN_OPS_RESERVED]; + rocprofiler_tracer_callback_t callback; + char reserved0[sizeof(uint64_t)]; + char reserved1[ROCPROFILER_DOMAIN_OPS_RESERVED]; }; /// for buffered callbacks, the tool provides a callback to create a buffer and the size @@ -147,16 +169,16 @@ rocprofiler_allocate_config(struct rocprofiler_config* cfg); rocprofiler_status_t rocprofiler_validate_config(const struct rocprofiler_config* cfg); -/// \brief rocprofiler activates configuration and provides a session identifier +/// \brief rocprofiler activates configuration and provides a context identifier /// \param [in] cfg may adjust config or assign values within structs. If error /// occurs, could nullptr valid sub-configs and leave the pointers to /// invalid configs -/// \param [out] id the session identifier for this config. +/// \param [out] id the context identifier for this config. rocprofiler_status_t -rocprofiler_start_config(struct rocprofiler_config*, rocprofiler_session_id_t* id); +rocprofiler_start_config(struct rocprofiler_config*, rocprofiler_context_id_t* id); /// \brief disable the configuration. -rocprofiler_status_t rocprofiler_stop_config(rocprofiler_session_id_t); +rocprofiler_status_t rocprofiler_stop_config(rocprofiler_context_id_t); /// /// diff --git a/source/lib/common/CMakeLists.txt b/source/lib/common/CMakeLists.txt index 634f1aab7c..52b1205879 100644 --- a/source/lib/common/CMakeLists.txt +++ b/source/lib/common/CMakeLists.txt @@ -17,10 +17,15 @@ target_include_directories(rocprofiler-common-library target_link_libraries( rocprofiler-common-library - PUBLIC rocprofiler::rocprofiler-amd-comgr - $ + PUBLIC $ + $ $ $ - $) + $ + $ + $ + $ + $ + $) set_target_properties(rocprofiler-common-library PROPERTIES OUTPUT_NAME rocprofiler-common) diff --git a/source/lib/common/container/atomic_ring_buffer.cpp b/source/lib/common/container/atomic_ring_buffer.cpp index c209077e09..a764b7a710 100644 --- a/source/lib/common/container/atomic_ring_buffer.cpp +++ b/source/lib/common/container/atomic_ring_buffer.cpp @@ -1,8 +1,6 @@ // MIT License // -// Copyright (c) 2020, The Regents of the University of California, -// through Lawrence Berkeley National Laboratory (subject to receipt of any -// required approvals from the U.S. Dept. of Energy). All rights reserved. +// Copyright (c) 2023 ROCm Developer Tools // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/source/lib/common/container/atomic_ring_buffer.hpp b/source/lib/common/container/atomic_ring_buffer.hpp index b2009133e2..1b97da7bb8 100644 --- a/source/lib/common/container/atomic_ring_buffer.hpp +++ b/source/lib/common/container/atomic_ring_buffer.hpp @@ -1,8 +1,6 @@ // MIT License // -// Copyright (c) 2020, The Regents of the University of California, -// through Lawrence Berkeley National Laboratory (subject to receipt of any -// required approvals from the U.S. Dept. of Energy). All rights reserved. +// Copyright (c) 2023 ROCm Developer Tools // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/source/lib/common/container/ring_buffer.cpp b/source/lib/common/container/ring_buffer.cpp index ff778a3b4d..6e15021ff5 100644 --- a/source/lib/common/container/ring_buffer.cpp +++ b/source/lib/common/container/ring_buffer.cpp @@ -1,8 +1,6 @@ // MIT License // -// Copyright (c) 2020, The Regents of the University of California, -// through Lawrence Berkeley National Laboratory (subject to receipt of any -// required approvals from the U.S. Dept. of Energy). All rights reserved. +// Copyright (c) 2023 ROCm Developer Tools // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/source/lib/common/container/ring_buffer.hpp b/source/lib/common/container/ring_buffer.hpp index 7421cd998c..31225e1031 100644 --- a/source/lib/common/container/ring_buffer.hpp +++ b/source/lib/common/container/ring_buffer.hpp @@ -1,8 +1,6 @@ // MIT License // -// Copyright (c) 2020, The Regents of the University of California, -// through Lawrence Berkeley National Laboratory (subject to receipt of any -// required approvals from the U.S. Dept. of Energy). All rights reserved. +// Copyright (c) 2023 ROCm Developer Tools // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/source/lib/common/defines.hpp b/source/lib/common/defines.hpp index 19683ac05b..19f515fc14 100644 --- a/source/lib/common/defines.hpp +++ b/source/lib/common/defines.hpp @@ -20,10 +20,9 @@ #pragma once -#define ROCPROFILER_ATTRIBUTE(...) __attribute__((__VA_ARGS__)) +#include + #define ROCPROFILER_VISIBILITY(MODE) ROCPROFILER_ATTRIBUTE(visibility(MODE)) -#define ROCPROFILER_PUBLIC_API ROCPROFILER_VISIBILITY("default") -#define ROCPROFILER_HIDDEN_API ROCPROFILER_VISIBILITY("hidden") #define ROCPROFILER_INTERNAL_API ROCPROFILER_VISIBILITY("internal") #define ROCPROFILER_INLINE ROCPROFILER_ATTRIBUTE(always_inline) inline #define ROCPROFILER_NOINLINE ROCPROFILER_ATTRIBUTE(noinline) diff --git a/source/lib/common/log.hpp b/source/lib/common/log.hpp index 13b6ada338..084f870d59 100644 --- a/source/lib/common/log.hpp +++ b/source/lib/common/log.hpp @@ -1,8 +1,6 @@ // MIT License // -// Copyright (c) 2020, The Regents of the University of California, -// through Lawrence Berkeley National Laboratory (subject to receipt of any -// required approvals from the U.S. Dept. of Energy). All rights reserved. +// Copyright (c) 2023 ROCm Developer Tools // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -17,9 +15,9 @@ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR rhs -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR rhsWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR rhs DEALINGS IN THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #pragma once diff --git a/source/lib/common/units.hpp b/source/lib/common/units.hpp index c6ceb36f8b..df0be08bac 100644 --- a/source/lib/common/units.hpp +++ b/source/lib/common/units.hpp @@ -1,26 +1,24 @@ -// MIT License +// MIT License // -// Copyright (c) 2020, The Regents of the University of California, -// through Lawrence Berkeley National Laboratory (subject to receipt of any -// required approvals from the U.S. Dept. of Energy). All rights reserved. +// Copyright (c) 2023 ROCm Developer Tools // -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: // -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. #pragma once diff --git a/source/lib/rocprofiler/CMakeLists.txt b/source/lib/rocprofiler/CMakeLists.txt index f4b02039cb..58f0f5a3b3 100644 --- a/source/lib/rocprofiler/CMakeLists.txt +++ b/source/lib/rocprofiler/CMakeLists.txt @@ -1,5 +1,8 @@ +# +# +# set(ROCPROFILER_LIB_HEADERS config_helpers.hpp config_internal.hpp tracer.hpp) -set(ROCPROFILER_LIB_SOURCES config_internal.cpp rocprofiler_config.cpp) +set(ROCPROFILER_LIB_SOURCES config_internal.cpp rocprofiler_config.cpp rocprofiler.cpp) add_library(rocprofiler-library SHARED) add_library(rocprofiler::rocprofiler-library ALIAS rocprofiler-library) @@ -11,18 +14,12 @@ add_subdirectory(hsa) target_link_libraries( rocprofiler-library - PUBLIC rocprofiler::rocprofiler-headers - PRIVATE rocprofiler::rocprofiler-build-flags - rocprofiler::rocprofiler-memcheck - rocprofiler::rocprofiler-common-library - rocprofiler::rocprofiler-stdcxxfs - rocprofiler::rocprofiler-dl - rocprofiler::rocprofiler-hip - rocprofiler::rocprofiler-amd-comgr - rocprofiler::rocprofiler-hsa-runtime) -target_compile_definitions( - rocprofiler-library PRIVATE AMD_INTERNAL_BUILD=1 PROF_API_IMPL=1 - HIP_PROF_HIP_API_STRING=1 __HIP_PLATFORM_AMD__=1) + PUBLIC rocprofiler::rocprofiler-headers rocprofiler::rocprofiler-hsa-runtime + rocprofiler::rocprofiler-hip + PRIVATE rocprofiler::rocprofiler-build-flags rocprofiler::rocprofiler-memcheck + rocprofiler::rocprofiler-common-library rocprofiler::rocprofiler-stdcxxfs + rocprofiler::rocprofiler-dl rocprofiler::rocprofiler-amd-comgr) + set_target_properties( rocprofiler-library PROPERTIES OUTPUT_NAME rocprofiler64 diff --git a/source/lib/rocprofiler/config_helpers.hpp b/source/lib/rocprofiler/config_helpers.hpp index f81a4d4453..a055923b8d 100644 --- a/source/lib/rocprofiler/config_helpers.hpp +++ b/source/lib/rocprofiler/config_helpers.hpp @@ -1,7 +1,7 @@ #pragma once -#include +#include "rocprofiler/rocprofiler.h" #include #include @@ -15,16 +15,16 @@ get_domain_max_op(rocprofiler_tracer_activity_domain_t _domain) { switch(_domain) { - case ACTIVITY_DOMAIN_NONE: return -1; - case ACTIVITY_DOMAIN_HSA_API: return 0; - case ACTIVITY_DOMAIN_HSA_OPS: return 0; - case ACTIVITY_DOMAIN_HIP_OPS: return 0; - case ACTIVITY_DOMAIN_HIP_API: return 0; - case ACTIVITY_DOMAIN_KFD_API: return -1; - case ACTIVITY_DOMAIN_EXT_API: return -1; - case ACTIVITY_DOMAIN_ROCTX: return 0; - case ACTIVITY_DOMAIN_HSA_EVT: return 0; - case ACTIVITY_DOMAIN_NUMBER: return -1; + case ROCPROFILER_TRACER_ACTIVITY_DOMAIN_NONE: return -1; + case ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API: return 0; + case ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HIP_API: return 0; + case ROCPROFILER_TRACER_ACTIVITY_DOMAIN_MARKER_API: return 0; + case ROCPROFILER_TRACER_ACTIVITY_DOMAIN_KFD_API: return -1; + case ROCPROFILER_TRACER_ACTIVITY_DOMAIN_EXT_API: return -1; + case ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_OPS: return 0; + case ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HIP_OPS: return 0; + case ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_EVT: return 0; + case ROCPROFILER_TRACER_ACTIVITY_DOMAIN_LAST: return -1; } return -1; } diff --git a/source/lib/rocprofiler/config_internal.hpp b/source/lib/rocprofiler/config_internal.hpp index 7e85791926..a55ebbb88f 100644 --- a/source/lib/rocprofiler/config_internal.hpp +++ b/source/lib/rocprofiler/config_internal.hpp @@ -30,7 +30,7 @@ struct correlation_config struct domain_config { - ::rocprofiler_sync_callback_t user_sync_callback = nullptr; + ::rocprofiler_tracer_callback_t user_sync_callback = nullptr; int64_t domains = 0; std::bitset opcodes = {}; @@ -57,7 +57,7 @@ struct config size_t size = 0; // = sizeof(rocprofiler_config) uint32_t compat_version = 0; // set by user uint32_t api_version = 0; // set by rocprofiler - uint64_t session_idx = 0; // session id index + uint64_t context_idx = 0; // context id index void* user_data = nullptr; // user data passed to callbacks correlation_config* correlation_id = nullptr; // &my_cid_config (optional) buffer_config* buffer = nullptr; // = &my_buffer_config (required) diff --git a/source/lib/rocprofiler/hsa/CMakeLists.txt b/source/lib/rocprofiler/hsa/CMakeLists.txt index 3bd8816d18..b4504714eb 100644 --- a/source/lib/rocprofiler/hsa/CMakeLists.txt +++ b/source/lib/rocprofiler/hsa/CMakeLists.txt @@ -1,5 +1,5 @@ set(ROCPROFILER_LIB_HSA_SOURCES hsa.cpp) -set(ROCPROFILER_LIB_HSA_HEADERS hsa.hpp hsa-defines.hpp hsa-types.h hsa-utils.hpp) +set(ROCPROFILER_LIB_HSA_HEADERS hsa.hpp defines.hpp ostream.hpp types.hpp utils.hpp) target_sources(rocprofiler-library PRIVATE ${ROCPROFILER_LIB_HSA_SOURCES} ${ROCPROFILER_LIB_HSA_HEADERS}) diff --git a/source/lib/rocprofiler/hsa/hsa-defines.hpp b/source/lib/rocprofiler/hsa/defines.hpp similarity index 89% rename from source/lib/rocprofiler/hsa/hsa-defines.hpp rename to source/lib/rocprofiler/hsa/defines.hpp index 114f34ddee..b03a4f5d15 100644 --- a/source/lib/rocprofiler/hsa/hsa-defines.hpp +++ b/source/lib/rocprofiler/hsa/defines.hpp @@ -174,11 +174,18 @@ \ static auto get_functor() { return get_functor(get_table_func()); } \ \ - static std::string as_string(hsa_trace_data_t) { return std::string{name} + "()"; } \ + static std::string as_string(rocprofiler_hsa_trace_data_t) \ + { \ + return std::string{name} + "()"; \ + } \ \ - static std::string as_named_string(hsa_trace_data_t) { return std::string{name} + "()"; } \ + static std::string as_named_string(rocprofiler_hsa_trace_data_t) \ + { \ + return std::string{name} + "()"; \ + } \ \ - static std::vector> as_arg_list(hsa_trace_data_t) \ + static std::vector> as_arg_list( \ + rocprofiler_hsa_trace_data_t) \ { \ return {}; \ } \ @@ -243,20 +250,20 @@ \ static auto get_functor() { return get_functor(get_table_func()); } \ \ - static std::string as_string(hsa_trace_data_t trace_data) \ + static std::string as_string(rocprofiler_hsa_trace_data_t trace_data) \ { \ return utils::join(utils::join_args{std::string{name} + "(", ")", ", "}, \ GET_MEMBER_FIELDS(get_api_data_args(trace_data), __VA_ARGS__)); \ } \ \ - static std::string as_named_string(hsa_trace_data_t trace_data) \ + static std::string as_named_string(rocprofiler_hsa_trace_data_t trace_data) \ { \ return utils::join( \ utils::join_args{std::string{name} + "(", ")", ", "}, \ GET_NAMED_MEMBER_FIELDS(get_api_data_args(trace_data), __VA_ARGS__)); \ } \ \ - static auto as_arg_list(hsa_trace_data_t trace_data) \ + static auto as_arg_list(rocprofiler_hsa_trace_data_t trace_data) \ { \ return utils::stringize( \ GET_NAMED_MEMBER_FIELDS(get_api_data_args(trace_data), __VA_ARGS__)); \ @@ -264,3 +271,18 @@ }; \ } \ } + +#define HSA_API_TABLE_LOOKUP_DEFINITION(TABLE_ID, MEMBER) \ + namespace rocprofiler \ + { \ + namespace hsa \ + { \ + template <> \ + struct hsa_table_lookup \ + { \ + auto& operator()(hsa_api_table_t& _v) const { return _v.MEMBER; } \ + auto& operator()(hsa_api_table_t* _v) const { return _v->MEMBER; } \ + auto& operator()() const { return (*this)(get_table()); } \ + }; \ + } \ + } diff --git a/source/lib/rocprofiler/hsa/hsa-types.h b/source/lib/rocprofiler/hsa/hsa-types.h deleted file mode 100644 index 0aa0e6d27c..0000000000 --- a/source/lib/rocprofiler/hsa/hsa-types.h +++ /dev/null @@ -1,1456 +0,0 @@ -// Copyright (c) 2018-2023 Advanced Micro Devices, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#pragma once - -#include -#include -#include -#include - -enum hsa_table_api_id_t -{ - HSA_API_TABLE_ID_NONE = -1, - HSA_API_TABLE_ID_CoreApi = 0, - HSA_API_TABLE_ID_AmdExt, - HSA_API_TABLE_ID_ImageExt, - HSA_API_TABLE_ID_NUMBER, -}; - -enum hsa_api_id_t -{ - HSA_API_ID_NONE = -1, - // block: CoreApi API - HSA_API_ID_hsa_init = 0, - HSA_API_ID_hsa_shut_down, - HSA_API_ID_hsa_system_get_info, - HSA_API_ID_hsa_system_extension_supported, - HSA_API_ID_hsa_system_get_extension_table, - HSA_API_ID_hsa_iterate_agents, - HSA_API_ID_hsa_agent_get_info, - HSA_API_ID_hsa_queue_create, - HSA_API_ID_hsa_soft_queue_create, - HSA_API_ID_hsa_queue_destroy, - HSA_API_ID_hsa_queue_inactivate, - HSA_API_ID_hsa_queue_load_read_index_scacquire, - HSA_API_ID_hsa_queue_load_read_index_relaxed, - HSA_API_ID_hsa_queue_load_write_index_scacquire, - HSA_API_ID_hsa_queue_load_write_index_relaxed, - HSA_API_ID_hsa_queue_store_write_index_relaxed, - HSA_API_ID_hsa_queue_store_write_index_screlease, - HSA_API_ID_hsa_queue_cas_write_index_scacq_screl, - HSA_API_ID_hsa_queue_cas_write_index_scacquire, - HSA_API_ID_hsa_queue_cas_write_index_relaxed, - HSA_API_ID_hsa_queue_cas_write_index_screlease, - HSA_API_ID_hsa_queue_add_write_index_scacq_screl, - HSA_API_ID_hsa_queue_add_write_index_scacquire, - HSA_API_ID_hsa_queue_add_write_index_relaxed, - HSA_API_ID_hsa_queue_add_write_index_screlease, - HSA_API_ID_hsa_queue_store_read_index_relaxed, - HSA_API_ID_hsa_queue_store_read_index_screlease, - HSA_API_ID_hsa_agent_iterate_regions, - HSA_API_ID_hsa_region_get_info, - HSA_API_ID_hsa_agent_get_exception_policies, - HSA_API_ID_hsa_agent_extension_supported, - HSA_API_ID_hsa_memory_register, - HSA_API_ID_hsa_memory_deregister, - HSA_API_ID_hsa_memory_allocate, - HSA_API_ID_hsa_memory_free, - HSA_API_ID_hsa_memory_copy, - HSA_API_ID_hsa_memory_assign_agent, - HSA_API_ID_hsa_signal_create, - HSA_API_ID_hsa_signal_destroy, - HSA_API_ID_hsa_signal_load_relaxed, - HSA_API_ID_hsa_signal_load_scacquire, - HSA_API_ID_hsa_signal_store_relaxed, - HSA_API_ID_hsa_signal_store_screlease, - HSA_API_ID_hsa_signal_wait_relaxed, - HSA_API_ID_hsa_signal_wait_scacquire, - HSA_API_ID_hsa_signal_and_relaxed, - HSA_API_ID_hsa_signal_and_scacquire, - HSA_API_ID_hsa_signal_and_screlease, - HSA_API_ID_hsa_signal_and_scacq_screl, - HSA_API_ID_hsa_signal_or_relaxed, - HSA_API_ID_hsa_signal_or_scacquire, - HSA_API_ID_hsa_signal_or_screlease, - HSA_API_ID_hsa_signal_or_scacq_screl, - HSA_API_ID_hsa_signal_xor_relaxed, - HSA_API_ID_hsa_signal_xor_scacquire, - HSA_API_ID_hsa_signal_xor_screlease, - HSA_API_ID_hsa_signal_xor_scacq_screl, - HSA_API_ID_hsa_signal_exchange_relaxed, - HSA_API_ID_hsa_signal_exchange_scacquire, - HSA_API_ID_hsa_signal_exchange_screlease, - HSA_API_ID_hsa_signal_exchange_scacq_screl, - HSA_API_ID_hsa_signal_add_relaxed, - HSA_API_ID_hsa_signal_add_scacquire, - HSA_API_ID_hsa_signal_add_screlease, - HSA_API_ID_hsa_signal_add_scacq_screl, - HSA_API_ID_hsa_signal_subtract_relaxed, - HSA_API_ID_hsa_signal_subtract_scacquire, - HSA_API_ID_hsa_signal_subtract_screlease, - HSA_API_ID_hsa_signal_subtract_scacq_screl, - HSA_API_ID_hsa_signal_cas_relaxed, - HSA_API_ID_hsa_signal_cas_scacquire, - HSA_API_ID_hsa_signal_cas_screlease, - HSA_API_ID_hsa_signal_cas_scacq_screl, - HSA_API_ID_hsa_isa_from_name, - HSA_API_ID_hsa_isa_get_info, - HSA_API_ID_hsa_isa_compatible, - HSA_API_ID_hsa_code_object_serialize, - HSA_API_ID_hsa_code_object_deserialize, - HSA_API_ID_hsa_code_object_destroy, - HSA_API_ID_hsa_code_object_get_info, - HSA_API_ID_hsa_code_object_get_symbol, - HSA_API_ID_hsa_code_symbol_get_info, - HSA_API_ID_hsa_code_object_iterate_symbols, - HSA_API_ID_hsa_executable_create, - HSA_API_ID_hsa_executable_destroy, - HSA_API_ID_hsa_executable_load_code_object, - HSA_API_ID_hsa_executable_freeze, - HSA_API_ID_hsa_executable_get_info, - HSA_API_ID_hsa_executable_global_variable_define, - HSA_API_ID_hsa_executable_agent_global_variable_define, - HSA_API_ID_hsa_executable_readonly_variable_define, - HSA_API_ID_hsa_executable_validate, - HSA_API_ID_hsa_executable_get_symbol, - HSA_API_ID_hsa_executable_symbol_get_info, - HSA_API_ID_hsa_executable_iterate_symbols, - HSA_API_ID_hsa_status_string, - HSA_API_ID_hsa_extension_get_name, - HSA_API_ID_hsa_system_major_extension_supported, - HSA_API_ID_hsa_system_get_major_extension_table, - HSA_API_ID_hsa_agent_major_extension_supported, - HSA_API_ID_hsa_cache_get_info, - HSA_API_ID_hsa_agent_iterate_caches, - HSA_API_ID_hsa_signal_silent_store_relaxed, - HSA_API_ID_hsa_signal_silent_store_screlease, - HSA_API_ID_hsa_signal_group_create, - HSA_API_ID_hsa_signal_group_destroy, - HSA_API_ID_hsa_signal_group_wait_any_scacquire, - HSA_API_ID_hsa_signal_group_wait_any_relaxed, - HSA_API_ID_hsa_agent_iterate_isas, - HSA_API_ID_hsa_isa_get_info_alt, - HSA_API_ID_hsa_isa_get_exception_policies, - HSA_API_ID_hsa_isa_get_round_method, - HSA_API_ID_hsa_wavefront_get_info, - HSA_API_ID_hsa_isa_iterate_wavefronts, - HSA_API_ID_hsa_code_object_get_symbol_from_name, - HSA_API_ID_hsa_code_object_reader_create_from_file, - HSA_API_ID_hsa_code_object_reader_create_from_memory, - HSA_API_ID_hsa_code_object_reader_destroy, - HSA_API_ID_hsa_executable_create_alt, - HSA_API_ID_hsa_executable_load_program_code_object, - HSA_API_ID_hsa_executable_load_agent_code_object, - HSA_API_ID_hsa_executable_validate_alt, - HSA_API_ID_hsa_executable_get_symbol_by_name, - HSA_API_ID_hsa_executable_iterate_agent_symbols, - HSA_API_ID_hsa_executable_iterate_program_symbols, - - // block: AmdExt API - HSA_API_ID_hsa_amd_coherency_get_type, - HSA_API_ID_hsa_amd_coherency_set_type, - HSA_API_ID_hsa_amd_profiling_set_profiler_enabled, - HSA_API_ID_hsa_amd_profiling_async_copy_enable, - HSA_API_ID_hsa_amd_profiling_get_dispatch_time, - HSA_API_ID_hsa_amd_profiling_get_async_copy_time, - HSA_API_ID_hsa_amd_profiling_convert_tick_to_system_domain, - HSA_API_ID_hsa_amd_signal_async_handler, - HSA_API_ID_hsa_amd_async_function, - HSA_API_ID_hsa_amd_signal_wait_any, - HSA_API_ID_hsa_amd_queue_cu_set_mask, - HSA_API_ID_hsa_amd_memory_pool_get_info, - HSA_API_ID_hsa_amd_agent_iterate_memory_pools, - HSA_API_ID_hsa_amd_memory_pool_allocate, - HSA_API_ID_hsa_amd_memory_pool_free, - HSA_API_ID_hsa_amd_memory_async_copy, - HSA_API_ID_hsa_amd_memory_async_copy_on_engine, - HSA_API_ID_hsa_amd_memory_copy_engine_status, - HSA_API_ID_hsa_amd_agent_memory_pool_get_info, - HSA_API_ID_hsa_amd_agents_allow_access, - HSA_API_ID_hsa_amd_memory_pool_can_migrate, - HSA_API_ID_hsa_amd_memory_migrate, - HSA_API_ID_hsa_amd_memory_lock, - HSA_API_ID_hsa_amd_memory_unlock, - HSA_API_ID_hsa_amd_memory_fill, - HSA_API_ID_hsa_amd_interop_map_buffer, - HSA_API_ID_hsa_amd_interop_unmap_buffer, - HSA_API_ID_hsa_amd_image_create, - HSA_API_ID_hsa_amd_pointer_info, - HSA_API_ID_hsa_amd_pointer_info_set_userdata, - HSA_API_ID_hsa_amd_ipc_memory_create, - HSA_API_ID_hsa_amd_ipc_memory_attach, - HSA_API_ID_hsa_amd_ipc_memory_detach, - HSA_API_ID_hsa_amd_signal_create, - HSA_API_ID_hsa_amd_ipc_signal_create, - HSA_API_ID_hsa_amd_ipc_signal_attach, - HSA_API_ID_hsa_amd_register_system_event_handler, - HSA_API_ID_hsa_amd_queue_intercept_create, - HSA_API_ID_hsa_amd_queue_intercept_register, - HSA_API_ID_hsa_amd_queue_set_priority, - HSA_API_ID_hsa_amd_memory_async_copy_rect, - HSA_API_ID_hsa_amd_runtime_queue_create_register, - HSA_API_ID_hsa_amd_memory_lock_to_pool, - HSA_API_ID_hsa_amd_register_deallocation_callback, - HSA_API_ID_hsa_amd_deregister_deallocation_callback, - HSA_API_ID_hsa_amd_signal_value_pointer, - HSA_API_ID_hsa_amd_svm_attributes_set, - HSA_API_ID_hsa_amd_svm_attributes_get, - HSA_API_ID_hsa_amd_svm_prefetch_async, - HSA_API_ID_hsa_amd_spm_acquire, - HSA_API_ID_hsa_amd_spm_release, - HSA_API_ID_hsa_amd_spm_set_dest_buffer, - HSA_API_ID_hsa_amd_queue_cu_get_mask, - HSA_API_ID_hsa_amd_portable_export_dmabuf, - HSA_API_ID_hsa_amd_portable_close_dmabuf, - - // block: ImageExt API - HSA_API_ID_hsa_ext_image_get_capability, - HSA_API_ID_hsa_ext_image_data_get_info, - HSA_API_ID_hsa_ext_image_create, - HSA_API_ID_hsa_ext_image_import, - HSA_API_ID_hsa_ext_image_export, - HSA_API_ID_hsa_ext_image_copy, - HSA_API_ID_hsa_ext_image_clear, - HSA_API_ID_hsa_ext_image_destroy, - HSA_API_ID_hsa_ext_sampler_create, - HSA_API_ID_hsa_ext_sampler_destroy, - HSA_API_ID_hsa_ext_image_get_capability_with_layout, - HSA_API_ID_hsa_ext_image_data_get_info_with_layout, - HSA_API_ID_hsa_ext_image_create_with_layout, - - HSA_API_ID_DISPATCH, - HSA_API_ID_NUMBER, -}; - -typedef struct hsa_api_data_s -{ - uint64_t correlation_id; - uint32_t phase; - union - { - uint64_t uint64_t_retval; - uint32_t uint32_t_retval; - hsa_signal_value_t hsa_signal_value_t_retval; - hsa_status_t hsa_status_t_retval; - }; - union - { - // block: CoreApi API - struct - { - } hsa_init; - struct - { - } hsa_shut_down; - struct - { - hsa_system_info_t attribute; - void* value; - } hsa_system_get_info; - struct - { - uint16_t extension; - uint16_t version_major; - uint16_t version_minor; - bool* result; - } hsa_system_extension_supported; - struct - { - uint16_t extension; - uint16_t version_major; - uint16_t version_minor; - void* table; - } hsa_system_get_extension_table; - struct - { - hsa_status_t (*callback)(hsa_agent_t agent, void* data); - void* data; - } hsa_iterate_agents; - struct - { - hsa_agent_t agent; - hsa_agent_info_t attribute; - void* value; - } hsa_agent_get_info; - struct - { - hsa_agent_t agent; - uint32_t size; - hsa_queue_type32_t type; - void (*callback)(hsa_status_t status, hsa_queue_t* source, void* data); - void* data; - uint32_t private_segment_size; - uint32_t group_segment_size; - hsa_queue_t** queue; - } hsa_queue_create; - struct - { - hsa_region_t region; - uint32_t size; - hsa_queue_type32_t type; - uint32_t features; - hsa_signal_t doorbell_signal; - hsa_queue_t** queue; - } hsa_soft_queue_create; - struct - { - hsa_queue_t* queue; - } hsa_queue_destroy; - struct - { - hsa_queue_t* queue; - } hsa_queue_inactivate; - struct - { - const hsa_queue_t* queue; - } hsa_queue_load_read_index_scacquire; - struct - { - const hsa_queue_t* queue; - } hsa_queue_load_read_index_relaxed; - struct - { - const hsa_queue_t* queue; - } hsa_queue_load_write_index_scacquire; - struct - { - const hsa_queue_t* queue; - } hsa_queue_load_write_index_relaxed; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_store_write_index_relaxed; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_store_write_index_screlease; - struct - { - const hsa_queue_t* queue; - uint64_t expected; - uint64_t value; - } hsa_queue_cas_write_index_scacq_screl; - struct - { - const hsa_queue_t* queue; - uint64_t expected; - uint64_t value; - } hsa_queue_cas_write_index_scacquire; - struct - { - const hsa_queue_t* queue; - uint64_t expected; - uint64_t value; - } hsa_queue_cas_write_index_relaxed; - struct - { - const hsa_queue_t* queue; - uint64_t expected; - uint64_t value; - } hsa_queue_cas_write_index_screlease; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_add_write_index_scacq_screl; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_add_write_index_scacquire; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_add_write_index_relaxed; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_add_write_index_screlease; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_store_read_index_relaxed; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_store_read_index_screlease; - struct - { - hsa_agent_t agent; - hsa_status_t (*callback)(hsa_region_t region, void* data); - void* data; - } hsa_agent_iterate_regions; - struct - { - hsa_region_t region; - hsa_region_info_t attribute; - void* value; - } hsa_region_get_info; - struct - { - hsa_agent_t agent; - hsa_profile_t profile; - uint16_t* mask; - } hsa_agent_get_exception_policies; - struct - { - uint16_t extension; - hsa_agent_t agent; - uint16_t version_major; - uint16_t version_minor; - bool* result; - } hsa_agent_extension_supported; - struct - { - void* ptr; - size_t size; - } hsa_memory_register; - struct - { - void* ptr; - size_t size; - } hsa_memory_deregister; - struct - { - hsa_region_t region; - size_t size; - void** ptr; - } hsa_memory_allocate; - struct - { - void* ptr; - } hsa_memory_free; - struct - { - void* dst; - const void* src; - size_t size; - } hsa_memory_copy; - struct - { - void* ptr; - hsa_agent_t agent; - hsa_access_permission_t access; - } hsa_memory_assign_agent; - struct - { - hsa_signal_value_t initial_value; - uint32_t num_consumers; - const hsa_agent_t* consumers; - hsa_signal_t* signal; - } hsa_signal_create; - struct - { - hsa_signal_t signal; - } hsa_signal_destroy; - struct - { - hsa_signal_t signal; - } hsa_signal_load_relaxed; - struct - { - hsa_signal_t signal; - } hsa_signal_load_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_store_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_store_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_condition_t condition; - hsa_signal_value_t compare_value; - uint64_t timeout_hint; - hsa_wait_state_t wait_state_hint; - } hsa_signal_wait_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_condition_t condition; - hsa_signal_value_t compare_value; - uint64_t timeout_hint; - hsa_wait_state_t wait_state_hint; - } hsa_signal_wait_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_and_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_and_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_and_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_and_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_or_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_or_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_or_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_or_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_xor_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_xor_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_xor_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_xor_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_exchange_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_exchange_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_exchange_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_exchange_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_add_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_add_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_add_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_add_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_subtract_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_subtract_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_subtract_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_subtract_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t expected; - hsa_signal_value_t value; - } hsa_signal_cas_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t expected; - hsa_signal_value_t value; - } hsa_signal_cas_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t expected; - hsa_signal_value_t value; - } hsa_signal_cas_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t expected; - hsa_signal_value_t value; - } hsa_signal_cas_scacq_screl; - struct - { - const char* name; - hsa_isa_t* isa; - } hsa_isa_from_name; - struct - { - hsa_isa_t isa; - hsa_isa_info_t attribute; - uint32_t index; - void* value; - } hsa_isa_get_info; - struct - { - hsa_isa_t code_object_isa; - hsa_isa_t agent_isa; - bool* result; - } hsa_isa_compatible; - struct - { - hsa_code_object_t code_object; - hsa_status_t (*alloc_callback)(size_t size, hsa_callback_data_t data, void** address); - hsa_callback_data_t callback_data; - const char* options; - void** serialized_code_object; - size_t* serialized_code_object_size; - } hsa_code_object_serialize; - struct - { - void* serialized_code_object; - size_t serialized_code_object_size; - const char* options; - hsa_code_object_t* code_object; - } hsa_code_object_deserialize; - struct - { - hsa_code_object_t code_object; - } hsa_code_object_destroy; - struct - { - hsa_code_object_t code_object; - hsa_code_object_info_t attribute; - void* value; - } hsa_code_object_get_info; - struct - { - hsa_code_object_t code_object; - const char* symbol_name; - hsa_code_symbol_t* symbol; - } hsa_code_object_get_symbol; - struct - { - hsa_code_symbol_t code_symbol; - hsa_code_symbol_info_t attribute; - void* value; - } hsa_code_symbol_get_info; - struct - { - hsa_code_object_t code_object; - hsa_status_t (*callback)(hsa_code_object_t code_object, - hsa_code_symbol_t symbol, - void* data); - void* data; - } hsa_code_object_iterate_symbols; - struct - { - hsa_profile_t profile; - hsa_executable_state_t executable_state; - const char* options; - hsa_executable_t* executable; - } hsa_executable_create; - struct - { - hsa_executable_t executable; - } hsa_executable_destroy; - struct - { - hsa_executable_t executable; - hsa_agent_t agent; - hsa_code_object_t code_object; - const char* options; - } hsa_executable_load_code_object; - struct - { - hsa_executable_t executable; - const char* options; - } hsa_executable_freeze; - struct - { - hsa_executable_t executable; - hsa_executable_info_t attribute; - void* value; - } hsa_executable_get_info; - struct - { - hsa_executable_t executable; - const char* variable_name; - void* address; - } hsa_executable_global_variable_define; - struct - { - hsa_executable_t executable; - hsa_agent_t agent; - const char* variable_name; - void* address; - } hsa_executable_agent_global_variable_define; - struct - { - hsa_executable_t executable; - hsa_agent_t agent; - const char* variable_name; - void* address; - } hsa_executable_readonly_variable_define; - struct - { - hsa_executable_t executable; - uint32_t* result; - } hsa_executable_validate; - struct - { - hsa_executable_t executable; - const char* module_name; - const char* symbol_name; - hsa_agent_t agent; - int32_t call_convention; - hsa_executable_symbol_t* symbol; - } hsa_executable_get_symbol; - struct - { - hsa_executable_symbol_t executable_symbol; - hsa_executable_symbol_info_t attribute; - void* value; - } hsa_executable_symbol_get_info; - struct - { - hsa_executable_t executable; - hsa_status_t (*callback)(hsa_executable_t exec, - hsa_executable_symbol_t symbol, - void* data); - void* data; - } hsa_executable_iterate_symbols; - struct - { - hsa_status_t status; - const char** status_string; - } hsa_status_string; - struct - { - uint16_t extension; - const char** name; - } hsa_extension_get_name; - struct - { - uint16_t extension; - uint16_t version_major; - uint16_t* version_minor; - bool* result; - } hsa_system_major_extension_supported; - struct - { - uint16_t extension; - uint16_t version_major; - size_t table_length; - void* table; - } hsa_system_get_major_extension_table; - struct - { - uint16_t extension; - hsa_agent_t agent; - uint16_t version_major; - uint16_t* version_minor; - bool* result; - } hsa_agent_major_extension_supported; - struct - { - hsa_cache_t cache; - hsa_cache_info_t attribute; - void* value; - } hsa_cache_get_info; - struct - { - hsa_agent_t agent; - hsa_status_t (*callback)(hsa_cache_t cache, void* data); - void* data; - } hsa_agent_iterate_caches; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_silent_store_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_silent_store_screlease; - struct - { - uint32_t num_signals; - const hsa_signal_t* signals; - uint32_t num_consumers; - const hsa_agent_t* consumers; - hsa_signal_group_t* signal_group; - } hsa_signal_group_create; - struct - { - hsa_signal_group_t signal_group; - } hsa_signal_group_destroy; - struct - { - hsa_signal_group_t signal_group; - const hsa_signal_condition_t* conditions; - const hsa_signal_value_t* compare_values; - hsa_wait_state_t wait_state_hint; - hsa_signal_t* signal; - hsa_signal_value_t* value; - } hsa_signal_group_wait_any_scacquire; - struct - { - hsa_signal_group_t signal_group; - const hsa_signal_condition_t* conditions; - const hsa_signal_value_t* compare_values; - hsa_wait_state_t wait_state_hint; - hsa_signal_t* signal; - hsa_signal_value_t* value; - } hsa_signal_group_wait_any_relaxed; - struct - { - hsa_agent_t agent; - hsa_status_t (*callback)(hsa_isa_t isa, void* data); - void* data; - } hsa_agent_iterate_isas; - struct - { - hsa_isa_t isa; - hsa_isa_info_t attribute; - void* value; - } hsa_isa_get_info_alt; - struct - { - hsa_isa_t isa; - hsa_profile_t profile; - uint16_t* mask; - } hsa_isa_get_exception_policies; - struct - { - hsa_isa_t isa; - hsa_fp_type_t fp_type; - hsa_flush_mode_t flush_mode; - hsa_round_method_t* round_method; - } hsa_isa_get_round_method; - struct - { - hsa_wavefront_t wavefront; - hsa_wavefront_info_t attribute; - void* value; - } hsa_wavefront_get_info; - struct - { - hsa_isa_t isa; - hsa_status_t (*callback)(hsa_wavefront_t wavefront, void* data); - void* data; - } hsa_isa_iterate_wavefronts; - struct - { - hsa_code_object_t code_object; - const char* module_name; - const char* symbol_name; - hsa_code_symbol_t* symbol; - } hsa_code_object_get_symbol_from_name; - struct - { - hsa_file_t file; - hsa_code_object_reader_t* code_object_reader; - } hsa_code_object_reader_create_from_file; - struct - { - const void* code_object; - size_t size; - hsa_code_object_reader_t* code_object_reader; - } hsa_code_object_reader_create_from_memory; - struct - { - hsa_code_object_reader_t code_object_reader; - } hsa_code_object_reader_destroy; - struct - { - hsa_profile_t profile; - hsa_default_float_rounding_mode_t default_float_rounding_mode; - const char* options; - hsa_executable_t* executable; - } hsa_executable_create_alt; - struct - { - hsa_executable_t executable; - hsa_code_object_reader_t code_object_reader; - const char* options; - hsa_loaded_code_object_t* loaded_code_object; - } hsa_executable_load_program_code_object; - struct - { - hsa_executable_t executable; - hsa_agent_t agent; - hsa_code_object_reader_t code_object_reader; - const char* options; - hsa_loaded_code_object_t* loaded_code_object; - } hsa_executable_load_agent_code_object; - struct - { - hsa_executable_t executable; - const char* options; - uint32_t* result; - } hsa_executable_validate_alt; - struct - { - hsa_executable_t executable; - const char* symbol_name; - const hsa_agent_t* agent; - hsa_executable_symbol_t* symbol; - } hsa_executable_get_symbol_by_name; - struct - { - hsa_executable_t executable; - hsa_agent_t agent; - hsa_status_t (*callback)(hsa_executable_t exec, - hsa_agent_t agent, - hsa_executable_symbol_t symbol, - void* data); - void* data; - } hsa_executable_iterate_agent_symbols; - struct - { - hsa_executable_t executable; - hsa_status_t (*callback)(hsa_executable_t exec, - hsa_executable_symbol_t symbol, - void* data); - void* data; - } hsa_executable_iterate_program_symbols; - - // block: AmdExt API - struct - { - hsa_agent_t agent; - hsa_amd_coherency_type_t* type; - } hsa_amd_coherency_get_type; - struct - { - hsa_agent_t agent; - hsa_amd_coherency_type_t type; - } hsa_amd_coherency_set_type; - struct - { - hsa_queue_t* queue; - int enable; - } hsa_amd_profiling_set_profiler_enabled; - struct - { - bool enable; - } hsa_amd_profiling_async_copy_enable; - struct - { - hsa_agent_t agent; - hsa_signal_t signal; - hsa_amd_profiling_dispatch_time_t* time; - } hsa_amd_profiling_get_dispatch_time; - struct - { - hsa_signal_t signal; - hsa_amd_profiling_async_copy_time_t* time; - } hsa_amd_profiling_get_async_copy_time; - struct - { - hsa_agent_t agent; - uint64_t agent_tick; - uint64_t* system_tick; - } hsa_amd_profiling_convert_tick_to_system_domain; - struct - { - hsa_signal_t signal; - hsa_signal_condition_t cond; - hsa_signal_value_t value; - hsa_amd_signal_handler handler; - void* arg; - } hsa_amd_signal_async_handler; - struct - { - void (*callback)(void* arg); - void* arg; - } hsa_amd_async_function; - struct - { - uint32_t signal_count; - hsa_signal_t* signals; - hsa_signal_condition_t* conds; - hsa_signal_value_t* values; - uint64_t timeout_hint; - hsa_wait_state_t wait_hint; - hsa_signal_value_t* satisfying_value; - } hsa_amd_signal_wait_any; - struct - { - const hsa_queue_t* queue; - uint32_t num_cu_mask_count; - const uint32_t* cu_mask; - } hsa_amd_queue_cu_set_mask; - struct - { - hsa_amd_memory_pool_t memory_pool; - hsa_amd_memory_pool_info_t attribute; - void* value; - } hsa_amd_memory_pool_get_info; - struct - { - hsa_agent_t agent; - hsa_status_t (*callback)(hsa_amd_memory_pool_t memory_pool, void* data); - void* data; - } hsa_amd_agent_iterate_memory_pools; - struct - { - hsa_amd_memory_pool_t memory_pool; - size_t size; - uint32_t flags; - void** ptr; - } hsa_amd_memory_pool_allocate; - struct - { - void* ptr; - } hsa_amd_memory_pool_free; - struct - { - void* dst; - hsa_agent_t dst_agent; - const void* src; - hsa_agent_t src_agent; - size_t size; - uint32_t num_dep_signals; - const hsa_signal_t* dep_signals; - hsa_signal_t completion_signal; - } hsa_amd_memory_async_copy; - struct - { - void* dst; - hsa_agent_t dst_agent; - const void* src; - hsa_agent_t src_agent; - size_t size; - uint32_t num_dep_signals; - const hsa_signal_t* dep_signals; - hsa_signal_t completion_signal; - hsa_amd_sdma_engine_id_t engine_id; - bool force_copy_on_sdma; - } hsa_amd_memory_async_copy_on_engine; - struct - { - hsa_agent_t dst_agent; - hsa_agent_t src_agent; - uint32_t* engine_ids_mask; - } hsa_amd_memory_copy_engine_status; - struct - { - hsa_agent_t agent; - hsa_amd_memory_pool_t memory_pool; - hsa_amd_agent_memory_pool_info_t attribute; - void* value; - } hsa_amd_agent_memory_pool_get_info; - struct - { - uint32_t num_agents; - const hsa_agent_t* agents; - const uint32_t* flags; - const void* ptr; - } hsa_amd_agents_allow_access; - struct - { - hsa_amd_memory_pool_t src_memory_pool; - hsa_amd_memory_pool_t dst_memory_pool; - bool* result; - } hsa_amd_memory_pool_can_migrate; - struct - { - const void* ptr; - hsa_amd_memory_pool_t memory_pool; - uint32_t flags; - } hsa_amd_memory_migrate; - struct - { - void* host_ptr; - size_t size; - hsa_agent_t* agents; - int num_agent; - void** agent_ptr; - } hsa_amd_memory_lock; - struct - { - void* host_ptr; - } hsa_amd_memory_unlock; - struct - { - void* ptr; - uint32_t value; - size_t count; - } hsa_amd_memory_fill; - struct - { - uint32_t num_agents; - hsa_agent_t* agents; - int interop_handle; - uint32_t flags; - size_t* size; - void** ptr; - size_t* metadata_size; - const void** metadata; - } hsa_amd_interop_map_buffer; - struct - { - void* ptr; - } hsa_amd_interop_unmap_buffer; - struct - { - hsa_agent_t agent; - const hsa_ext_image_descriptor_t* image_descriptor; - const hsa_amd_image_descriptor_t* image_layout; - const void* image_data; - hsa_access_permission_t access_permission; - hsa_ext_image_t* image; - } hsa_amd_image_create; - struct - { - const void* ptr; - hsa_amd_pointer_info_t* info; - void* (*alloc)(size_t); - uint32_t* num_agents_accessible; - hsa_agent_t** accessible; - } hsa_amd_pointer_info; - struct - { - const void* ptr; - void* userdata; - } hsa_amd_pointer_info_set_userdata; - struct - { - void* ptr; - size_t len; - hsa_amd_ipc_memory_t* handle; - } hsa_amd_ipc_memory_create; - struct - { - const hsa_amd_ipc_memory_t* handle; - size_t len; - uint32_t num_agents; - const hsa_agent_t* mapping_agents; - void** mapped_ptr; - } hsa_amd_ipc_memory_attach; - struct - { - void* mapped_ptr; - } hsa_amd_ipc_memory_detach; - struct - { - hsa_signal_value_t initial_value; - uint32_t num_consumers; - const hsa_agent_t* consumers; - uint64_t attributes; - hsa_signal_t* signal; - } hsa_amd_signal_create; - struct - { - hsa_signal_t signal; - hsa_amd_ipc_signal_t* handle; - } hsa_amd_ipc_signal_create; - struct - { - const hsa_amd_ipc_signal_t* handle; - hsa_signal_t* signal; - } hsa_amd_ipc_signal_attach; - struct - { - hsa_amd_system_event_callback_t callback; - void* data; - } hsa_amd_register_system_event_handler; - struct - { - hsa_agent_t agent_handle; - uint32_t size; - hsa_queue_type32_t type; - void (*callback)(hsa_status_t status, hsa_queue_t* source, void* data); - void* data; - uint32_t private_segment_size; - uint32_t group_segment_size; - hsa_queue_t** queue; - } hsa_amd_queue_intercept_create; - struct - { - hsa_queue_t* queue; - hsa_amd_queue_intercept_handler callback; - void* user_data; - } hsa_amd_queue_intercept_register; - struct - { - hsa_queue_t* queue; - hsa_amd_queue_priority_t priority; - } hsa_amd_queue_set_priority; - struct - { - const hsa_pitched_ptr_t* dst; - const hsa_dim3_t* dst_offset; - const hsa_pitched_ptr_t* src; - const hsa_dim3_t* src_offset; - const hsa_dim3_t* range; - hsa_dim3_t range__val; - hsa_agent_t copy_agent; - hsa_amd_copy_direction_t dir; - uint32_t num_dep_signals; - const hsa_signal_t* dep_signals; - hsa_signal_t completion_signal; - } hsa_amd_memory_async_copy_rect; - struct - { - hsa_amd_runtime_queue_notifier callback; - void* user_data; - } hsa_amd_runtime_queue_create_register; - struct - { - void* host_ptr; - size_t size; - hsa_agent_t* agents; - int num_agent; - hsa_amd_memory_pool_t pool; - uint32_t flags; - void** agent_ptr; - } hsa_amd_memory_lock_to_pool; - struct - { - void* ptr; - hsa_amd_deallocation_callback_t callback; - void* user_data; - } hsa_amd_register_deallocation_callback; - struct - { - void* ptr; - hsa_amd_deallocation_callback_t callback; - } hsa_amd_deregister_deallocation_callback; - struct - { - hsa_signal_t signal; - volatile hsa_signal_value_t** value_ptr; - } hsa_amd_signal_value_pointer; - struct - { - void* ptr; - size_t size; - hsa_amd_svm_attribute_pair_t* attribute_list; - size_t attribute_count; - } hsa_amd_svm_attributes_set; - struct - { - void* ptr; - size_t size; - hsa_amd_svm_attribute_pair_t* attribute_list; - size_t attribute_count; - } hsa_amd_svm_attributes_get; - struct - { - void* ptr; - size_t size; - hsa_agent_t agent; - uint32_t num_dep_signals; - const hsa_signal_t* dep_signals; - hsa_signal_t completion_signal; - } hsa_amd_svm_prefetch_async; - struct - { - hsa_agent_t preferred_agent; - } hsa_amd_spm_acquire; - struct - { - hsa_agent_t preferred_agent; - } hsa_amd_spm_release; - struct - { - hsa_agent_t preferred_agent; - size_t size_in_bytes; - uint32_t* timeout; - uint32_t* size_copied; - void* dest; - bool* is_data_loss; - } hsa_amd_spm_set_dest_buffer; - struct - { - const hsa_queue_t* queue; - uint32_t num_cu_mask_count; - uint32_t* cu_mask; - } hsa_amd_queue_cu_get_mask; - struct - { - const void* ptr; - size_t size; - int* dmabuf; - uint64_t* offset; - } hsa_amd_portable_export_dmabuf; - struct - { - int dmabuf; - } hsa_amd_portable_close_dmabuf; - - // block: ImageExt API - struct - { - hsa_agent_t agent; - hsa_ext_image_geometry_t geometry; - const hsa_ext_image_format_t* image_format; - uint32_t* capability_mask; - } hsa_ext_image_get_capability; - struct - { - hsa_agent_t agent; - const hsa_ext_image_descriptor_t* image_descriptor; - hsa_access_permission_t access_permission; - hsa_ext_image_data_info_t* image_data_info; - } hsa_ext_image_data_get_info; - struct - { - hsa_agent_t agent; - const hsa_ext_image_descriptor_t* image_descriptor; - const void* image_data; - hsa_access_permission_t access_permission; - hsa_ext_image_t* image; - } hsa_ext_image_create; - struct - { - hsa_agent_t agent; - const void* src_memory; - size_t src_row_pitch; - size_t src_slice_pitch; - hsa_ext_image_t dst_image; - const hsa_ext_image_region_t* image_region; - } hsa_ext_image_import; - struct - { - hsa_agent_t agent; - hsa_ext_image_t src_image; - void* dst_memory; - size_t dst_row_pitch; - size_t dst_slice_pitch; - const hsa_ext_image_region_t* image_region; - } hsa_ext_image_export; - struct - { - hsa_agent_t agent; - hsa_ext_image_t src_image; - const hsa_dim3_t* src_offset; - hsa_ext_image_t dst_image; - const hsa_dim3_t* dst_offset; - const hsa_dim3_t* range; - } hsa_ext_image_copy; - struct - { - hsa_agent_t agent; - hsa_ext_image_t image; - const void* data; - const hsa_ext_image_region_t* image_region; - } hsa_ext_image_clear; - struct - { - hsa_agent_t agent; - hsa_ext_image_t image; - } hsa_ext_image_destroy; - struct - { - hsa_agent_t agent; - const hsa_ext_sampler_descriptor_t* sampler_descriptor; - hsa_ext_sampler_t* sampler; - } hsa_ext_sampler_create; - struct - { - hsa_agent_t agent; - hsa_ext_sampler_t sampler; - } hsa_ext_sampler_destroy; - struct - { - hsa_agent_t agent; - hsa_ext_image_geometry_t geometry; - const hsa_ext_image_format_t* image_format; - hsa_ext_image_data_layout_t image_data_layout; - uint32_t* capability_mask; - } hsa_ext_image_get_capability_with_layout; - struct - { - hsa_agent_t agent; - const hsa_ext_image_descriptor_t* image_descriptor; - hsa_access_permission_t access_permission; - hsa_ext_image_data_layout_t image_data_layout; - size_t image_data_row_pitch; - size_t image_data_slice_pitch; - hsa_ext_image_data_info_t* image_data_info; - } hsa_ext_image_data_get_info_with_layout; - struct - { - hsa_agent_t agent; - const hsa_ext_image_descriptor_t* image_descriptor; - const void* image_data; - hsa_access_permission_t access_permission; - hsa_ext_image_data_layout_t image_data_layout; - size_t image_data_row_pitch; - size_t image_data_slice_pitch; - hsa_ext_image_t* image; - } hsa_ext_image_create_with_layout; - } args; - uint64_t* phase_data; -} hsa_api_data_t; diff --git a/source/lib/rocprofiler/hsa/hsa.cpp b/source/lib/rocprofiler/hsa/hsa.cpp index 20a23a8e0f..bc06fff9a7 100644 --- a/source/lib/rocprofiler/hsa/hsa.cpp +++ b/source/lib/rocprofiler/hsa/hsa.cpp @@ -18,15 +18,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#include "hsa.hpp" -#include "hsa-types.h" +#include "lib/rocprofiler/hsa/hsa.hpp" -#include +#include "lib/common/defines.hpp" +#include "lib/rocprofiler/hsa/ostream.hpp" +#include "lib/rocprofiler/hsa/types.hpp" +#include "lib/rocprofiler/hsa/utils.hpp" #include #include #include -#include #include #include @@ -38,8 +39,38 @@ namespace { std::atomic report_activity = {}; -auto& -get_saved_table() +struct null_type +{}; + +template +void +set_data_retval(DataT& _data, Tp _val) +{ + if constexpr(std::is_same::value) + { + _data.hsa_signal_value_t_retval = _val; + } + else if constexpr(std::is_same::value) + { + _data.uint64_t_retval = _val; + } + else if constexpr(std::is_same::value) + { + _data.uint32_t_retval = _val; + } + else if constexpr(std::is_same::value) + { + _data.hsa_status_t_retval = _val; + } + else + { + static_assert(std::is_void::value, "Error! unsupported return type"); + } +} +} // namespace + +hsa_api_table_t& +get_table() { static auto _core = CoreApiTable{}; static auto _amd_ext = AmdExtTable{}; @@ -67,57 +98,6 @@ get_saved_table() }(); return _v; } -} // namespace - -template <> -struct hsa_table_lookup -{ - auto& operator()(hsa_api_table_t& _v) const { return _v.core_; } - auto& operator()(hsa_api_table_t* _v) const { return _v->core_; } - auto& operator()() const { return (*this)(get_saved_table()); } -}; - -template <> -struct hsa_table_lookup -{ - auto& operator()(hsa_api_table_t& _v) const { return _v.amd_ext_; } - auto& operator()(hsa_api_table_t* _v) const { return _v->amd_ext_; } - auto& operator()() const { return (*this)(get_saved_table()); } -}; - -template <> -struct hsa_table_lookup -{ - auto& operator()(hsa_api_table_t& _v) const { return _v.image_ext_; } - auto& operator()(hsa_api_table_t* _v) const { return _v->image_ext_; } - auto& operator()() const { return (*this)(get_saved_table()); } -}; - -template -void -set_data_retval(DataT& _data, Tp _val) -{ - if constexpr(std::is_same::value) - { - _data.hsa_signal_value_t_retval = _val; - } - else if constexpr(std::is_same::value) - { - _data.uint64_t_retval = _val; - } - else if constexpr(std::is_same::value) - { - _data.uint32_t_retval = _val; - } - else if constexpr(std::is_same::value) - { - _data.hsa_status_t_retval = _val; - } - else - { - static_assert(std::is_void::value, "Error! unsupported return type"); - } -} template template @@ -129,7 +109,7 @@ hsa_api_impl::phase_enter(DataT& _data, DataArgsT& _data_args, Args... args activity_functor_t _func = report_activity.load(std::memory_order_relaxed); if(_func) { - if constexpr(Idx == HSA_API_ID_hsa_amd_memory_async_copy_rect) + if constexpr(Idx == ROCPROFILER_HSA_API_ID_hsa_amd_memory_async_copy_rect) { auto _tuple = std::make_tuple(args...); _data.api_data.args.hsa_amd_memory_async_copy_rect.dst = std::get<0>(_tuple); @@ -175,9 +155,6 @@ hsa_api_impl::phase_exit(DataT& _data) return false; } -struct null_type -{}; - template template auto @@ -217,7 +194,7 @@ hsa_api_impl::functor(Args&&... args) { using info_type = hsa_api_info; - auto trace_data = hsa_trace_data_t{}; + auto trace_data = rocprofiler_hsa_trace_data_t{}; auto _enabled = phase_enter( trace_data, info_type::get_api_data_args(trace_data), std::forward(args)...); @@ -234,7 +211,8 @@ hsa_api_impl::functor(Args&&... args) } // namespace hsa } // namespace rocprofiler -#include "hsa.gen.cpp" +// template specializations +#include "hsa.def.cpp" namespace rocprofiler { @@ -262,13 +240,13 @@ hsa_api_id_by_name(const char* name, std::index_sequence) if constexpr(sizeof...(IdxTail) > 0) return hsa_api_id_by_name(name, std::index_sequence{}); else - return HSA_API_ID_NONE; + return ROCPROFILER_HSA_API_ID_NONE; } template std::string -hsa_api_data_string(const uint32_t id, - const hsa_trace_data_t& _data, +hsa_api_data_string(const uint32_t id, + const rocprofiler_hsa_trace_data_t& _data, std::index_sequence) { if(Idx == id) return hsa_api_info::as_string(_data); @@ -280,8 +258,8 @@ hsa_api_data_string(const uint32_t id, template std::string -hsa_api_named_data_string(const uint32_t id, - const hsa_trace_data_t& _data, +hsa_api_named_data_string(const uint32_t id, + const rocprofiler_hsa_trace_data_t& _data, std::index_sequence) { if(Idx == id) return hsa_api_info::as_named_string(_data); @@ -293,8 +271,8 @@ hsa_api_named_data_string(const uint32_t id, template void -hsa_api_iterate_args(const uint32_t id, - const hsa_trace_data_t& _data, +hsa_api_iterate_args(const uint32_t id, + const rocprofiler_hsa_trace_data_t& _data, int (*_func)(const char*, const char*), std::index_sequence) { @@ -314,7 +292,7 @@ void hsa_api_get_ids(std::vector& _id_list, std::index_sequence) { auto _emplace = [](auto& _vec, uint32_t _v) { - if(_v < HSA_API_ID_DISPATCH) _vec.emplace_back(_v); + if(_v < ROCPROFILER_HSA_API_ID_LAST) _vec.emplace_back(_v); }; (_emplace(_id_list, hsa_api_info::operation_idx), ...); @@ -352,42 +330,44 @@ hsa_api_update_table(hsa_api_table_t* _orig, std::index_sequence) const char* hsa_api_name(uint32_t id) { - return hsa_api_name(id, std::make_index_sequence{}); + return hsa_api_name(id, std::make_index_sequence{}); } uint32_t hsa_api_id_by_name(const char* name) { - return hsa_api_id_by_name(name, std::make_index_sequence{}); + return hsa_api_id_by_name(name, std::make_index_sequence{}); } std::string -hsa_api_data_string(uint32_t id, const hsa_trace_data_t& _data) +hsa_api_data_string(uint32_t id, const rocprofiler_hsa_trace_data_t& _data) { - return hsa_api_data_string(id, _data, std::make_index_sequence{}); + return hsa_api_data_string(id, _data, std::make_index_sequence{}); } std::string -hsa_api_named_data_string(uint32_t id, const hsa_trace_data_t& _data) +hsa_api_named_data_string(uint32_t id, const rocprofiler_hsa_trace_data_t& _data) { - return hsa_api_named_data_string(id, _data, std::make_index_sequence{}); + return hsa_api_named_data_string( + id, _data, std::make_index_sequence{}); } void -hsa_api_iterate_args(uint32_t id, - const hsa_trace_data_t& _data, +hsa_api_iterate_args(uint32_t id, + const rocprofiler_hsa_trace_data_t& _data, int (*_func)(const char*, const char*)) { if(_func) - hsa_api_iterate_args(id, _data, _func, std::make_index_sequence{}); + hsa_api_iterate_args( + id, _data, _func, std::make_index_sequence{}); } std::vector hsa_api_get_ids() { auto _data = std::vector{}; - _data.reserve(HSA_API_ID_DISPATCH); - hsa_api_get_ids(_data, std::make_index_sequence{}); + _data.reserve(ROCPROFILER_HSA_API_ID_LAST); + hsa_api_get_ids(_data, std::make_index_sequence{}); return _data; } @@ -395,8 +375,8 @@ std::vector hsa_api_get_names() { auto _data = std::vector{}; - _data.reserve(HSA_API_ID_DISPATCH); - hsa_api_get_names(_data, std::make_index_sequence{}); + _data.reserve(ROCPROFILER_HSA_API_ID_LAST); + hsa_api_get_names(_data, std::make_index_sequence{}); return _data; } @@ -410,7 +390,7 @@ hsa_api_set_callback(activity_functor_t _func) void hsa_api_update_table(hsa_api_table_t* _orig) { - if(_orig) hsa_api_update_table(_orig, std::make_index_sequence{}); + if(_orig) hsa_api_update_table(_orig, std::make_index_sequence{}); } } // namespace hsa } // namespace rocprofiler @@ -426,8 +406,10 @@ OnLoad(HsaApiTable* table, (void) failed_tool_count; (void) failed_tool_names; - auto& _saved = rocprofiler::hsa::get_saved_table(); - copyTables(table, &_saved); + fprintf(stderr, "[%s:%i] %s\n", __FILE__, __LINE__, __FUNCTION__); + + auto& _saved = rocprofiler::hsa::get_table(); + ::copyTables(table, &_saved); rocprofiler::hsa::hsa_api_update_table(table); diff --git a/source/lib/rocprofiler/hsa/hsa.def.cpp b/source/lib/rocprofiler/hsa/hsa.def.cpp new file mode 100644 index 0000000000..0f68f47045 --- /dev/null +++ b/source/lib/rocprofiler/hsa/hsa.def.cpp @@ -0,0 +1,224 @@ +// Copyright (c) 2018-2023 Advanced Micro Devices, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#include + +#include "hsa.hpp" +#include "defines.hpp" + +// clang-format off +HSA_API_TABLE_LOOKUP_DEFINITION(ROCPROFILER_HSA_API_TABLE_ID_CoreApi, core_) +HSA_API_TABLE_LOOKUP_DEFINITION(ROCPROFILER_HSA_API_TABLE_ID_AmdExt, amd_ext_) +HSA_API_TABLE_LOOKUP_DEFINITION(ROCPROFILER_HSA_API_TABLE_ID_ImageExt, image_ext_) + +HSA_API_INFO_DEFINITION_0(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_init, hsa_init, hsa_init_fn) +HSA_API_INFO_DEFINITION_0(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_shut_down, hsa_shut_down, hsa_shut_down_fn) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_system_get_info, hsa_system_get_info, hsa_system_get_info_fn, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_system_extension_supported, hsa_system_extension_supported, hsa_system_extension_supported_fn, extension, version_major, version_minor, result) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_system_get_extension_table, hsa_system_get_extension_table, hsa_system_get_extension_table_fn, extension, version_major, version_minor, table) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_iterate_agents, hsa_iterate_agents, hsa_iterate_agents_fn, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_agent_get_info, hsa_agent_get_info, hsa_agent_get_info_fn, agent, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_create, hsa_queue_create, hsa_queue_create_fn, agent, size, type, callback, data, private_segment_size, group_segment_size, queue) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_soft_queue_create, hsa_soft_queue_create, hsa_soft_queue_create_fn, region, size, type, features, doorbell_signal, queue) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_destroy, hsa_queue_destroy, hsa_queue_destroy_fn, queue) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_inactivate, hsa_queue_inactivate, hsa_queue_inactivate_fn, queue) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_load_read_index_scacquire, hsa_queue_load_read_index_scacquire, hsa_queue_load_read_index_scacquire_fn, queue) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_load_read_index_relaxed, hsa_queue_load_read_index_relaxed, hsa_queue_load_read_index_relaxed_fn, queue) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_load_write_index_scacquire, hsa_queue_load_write_index_scacquire, hsa_queue_load_write_index_scacquire_fn, queue) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_load_write_index_relaxed, hsa_queue_load_write_index_relaxed, hsa_queue_load_write_index_relaxed_fn, queue) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_store_write_index_relaxed, hsa_queue_store_write_index_relaxed, hsa_queue_store_write_index_relaxed_fn, queue, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_store_write_index_screlease, hsa_queue_store_write_index_screlease, hsa_queue_store_write_index_screlease_fn, queue, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_cas_write_index_scacq_screl, hsa_queue_cas_write_index_scacq_screl, hsa_queue_cas_write_index_scacq_screl_fn, queue, expected, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_cas_write_index_scacquire, hsa_queue_cas_write_index_scacquire, hsa_queue_cas_write_index_scacquire_fn, queue, expected, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_cas_write_index_relaxed, hsa_queue_cas_write_index_relaxed, hsa_queue_cas_write_index_relaxed_fn, queue, expected, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_cas_write_index_screlease, hsa_queue_cas_write_index_screlease, hsa_queue_cas_write_index_screlease_fn, queue, expected, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_add_write_index_scacq_screl, hsa_queue_add_write_index_scacq_screl, hsa_queue_add_write_index_scacq_screl_fn, queue, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_add_write_index_scacquire, hsa_queue_add_write_index_scacquire, hsa_queue_add_write_index_scacquire_fn, queue, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_add_write_index_relaxed, hsa_queue_add_write_index_relaxed, hsa_queue_add_write_index_relaxed_fn, queue, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_add_write_index_screlease, hsa_queue_add_write_index_screlease, hsa_queue_add_write_index_screlease_fn, queue, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_store_read_index_relaxed, hsa_queue_store_read_index_relaxed, hsa_queue_store_read_index_relaxed_fn, queue, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_queue_store_read_index_screlease, hsa_queue_store_read_index_screlease, hsa_queue_store_read_index_screlease_fn, queue, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_agent_iterate_regions, hsa_agent_iterate_regions, hsa_agent_iterate_regions_fn, agent, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_region_get_info, hsa_region_get_info, hsa_region_get_info_fn, region, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_agent_get_exception_policies, hsa_agent_get_exception_policies, hsa_agent_get_exception_policies_fn, agent, profile, mask) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_agent_extension_supported, hsa_agent_extension_supported, hsa_agent_extension_supported_fn, extension, agent, version_major, version_minor, result) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_memory_register, hsa_memory_register, hsa_memory_register_fn, ptr, size) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_memory_deregister, hsa_memory_deregister, hsa_memory_deregister_fn, ptr, size) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_memory_allocate, hsa_memory_allocate, hsa_memory_allocate_fn, region, size, ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_memory_free, hsa_memory_free, hsa_memory_free_fn, ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_memory_copy, hsa_memory_copy, hsa_memory_copy_fn, dst, src, size) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_memory_assign_agent, hsa_memory_assign_agent, hsa_memory_assign_agent_fn, ptr, agent, access) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_create, hsa_signal_create, hsa_signal_create_fn, initial_value, num_consumers, consumers, signal) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_destroy, hsa_signal_destroy, hsa_signal_destroy_fn, signal) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_load_relaxed, hsa_signal_load_relaxed, hsa_signal_load_relaxed_fn, signal) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_load_scacquire, hsa_signal_load_scacquire, hsa_signal_load_scacquire_fn, signal) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_store_relaxed, hsa_signal_store_relaxed, hsa_signal_store_relaxed_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_store_screlease, hsa_signal_store_screlease, hsa_signal_store_screlease_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_wait_relaxed, hsa_signal_wait_relaxed, hsa_signal_wait_relaxed_fn, signal, condition, compare_value, timeout_hint, wait_state_hint) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_wait_scacquire, hsa_signal_wait_scacquire, hsa_signal_wait_scacquire_fn, signal, condition, compare_value, timeout_hint, wait_state_hint) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_and_relaxed, hsa_signal_and_relaxed, hsa_signal_and_relaxed_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_and_scacquire, hsa_signal_and_scacquire, hsa_signal_and_scacquire_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_and_screlease, hsa_signal_and_screlease, hsa_signal_and_screlease_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_and_scacq_screl, hsa_signal_and_scacq_screl, hsa_signal_and_scacq_screl_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_or_relaxed, hsa_signal_or_relaxed, hsa_signal_or_relaxed_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_or_scacquire, hsa_signal_or_scacquire, hsa_signal_or_scacquire_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_or_screlease, hsa_signal_or_screlease, hsa_signal_or_screlease_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_or_scacq_screl, hsa_signal_or_scacq_screl, hsa_signal_or_scacq_screl_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_xor_relaxed, hsa_signal_xor_relaxed, hsa_signal_xor_relaxed_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_xor_scacquire, hsa_signal_xor_scacquire, hsa_signal_xor_scacquire_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_xor_screlease, hsa_signal_xor_screlease, hsa_signal_xor_screlease_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_xor_scacq_screl, hsa_signal_xor_scacq_screl, hsa_signal_xor_scacq_screl_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_exchange_relaxed, hsa_signal_exchange_relaxed, hsa_signal_exchange_relaxed_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_exchange_scacquire, hsa_signal_exchange_scacquire, hsa_signal_exchange_scacquire_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_exchange_screlease, hsa_signal_exchange_screlease, hsa_signal_exchange_screlease_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_exchange_scacq_screl, hsa_signal_exchange_scacq_screl, hsa_signal_exchange_scacq_screl_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_add_relaxed, hsa_signal_add_relaxed, hsa_signal_add_relaxed_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_add_scacquire, hsa_signal_add_scacquire, hsa_signal_add_scacquire_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_add_screlease, hsa_signal_add_screlease, hsa_signal_add_screlease_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_add_scacq_screl, hsa_signal_add_scacq_screl, hsa_signal_add_scacq_screl_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_subtract_relaxed, hsa_signal_subtract_relaxed, hsa_signal_subtract_relaxed_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_subtract_scacquire, hsa_signal_subtract_scacquire, hsa_signal_subtract_scacquire_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_subtract_screlease, hsa_signal_subtract_screlease, hsa_signal_subtract_screlease_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_subtract_scacq_screl, hsa_signal_subtract_scacq_screl, hsa_signal_subtract_scacq_screl_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_cas_relaxed, hsa_signal_cas_relaxed, hsa_signal_cas_relaxed_fn, signal, expected, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_cas_scacquire, hsa_signal_cas_scacquire, hsa_signal_cas_scacquire_fn, signal, expected, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_cas_screlease, hsa_signal_cas_screlease, hsa_signal_cas_screlease_fn, signal, expected, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_cas_scacq_screl, hsa_signal_cas_scacq_screl, hsa_signal_cas_scacq_screl_fn, signal, expected, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_isa_from_name, hsa_isa_from_name, hsa_isa_from_name_fn, name, isa) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_isa_get_info, hsa_isa_get_info, hsa_isa_get_info_fn, isa, attribute, index, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_isa_compatible, hsa_isa_compatible, hsa_isa_compatible_fn, code_object_isa, agent_isa, result) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_object_serialize, hsa_code_object_serialize, hsa_code_object_serialize_fn, code_object, alloc_callback, callback_data, options, serialized_code_object, serialized_code_object_size) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_object_deserialize, hsa_code_object_deserialize, hsa_code_object_deserialize_fn, serialized_code_object, serialized_code_object_size, options, code_object) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_object_destroy, hsa_code_object_destroy, hsa_code_object_destroy_fn, code_object) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_object_get_info, hsa_code_object_get_info, hsa_code_object_get_info_fn, code_object, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_object_get_symbol, hsa_code_object_get_symbol, hsa_code_object_get_symbol_fn, code_object, symbol_name, symbol) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_symbol_get_info, hsa_code_symbol_get_info, hsa_code_symbol_get_info_fn, code_symbol, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_object_iterate_symbols, hsa_code_object_iterate_symbols, hsa_code_object_iterate_symbols_fn, code_object, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_create, hsa_executable_create, hsa_executable_create_fn, profile, executable_state, options, executable) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_destroy, hsa_executable_destroy, hsa_executable_destroy_fn, executable) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_load_code_object, hsa_executable_load_code_object, hsa_executable_load_code_object_fn, executable, agent, code_object, options) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_freeze, hsa_executable_freeze, hsa_executable_freeze_fn, executable, options) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_get_info, hsa_executable_get_info, hsa_executable_get_info_fn, executable, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_global_variable_define, hsa_executable_global_variable_define, hsa_executable_global_variable_define_fn, executable, variable_name, address) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_agent_global_variable_define, hsa_executable_agent_global_variable_define, hsa_executable_agent_global_variable_define_fn, executable, agent, variable_name, address) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_readonly_variable_define, hsa_executable_readonly_variable_define, hsa_executable_readonly_variable_define_fn, executable, agent, variable_name, address) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_validate, hsa_executable_validate, hsa_executable_validate_fn, executable, result) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_get_symbol, hsa_executable_get_symbol, hsa_executable_get_symbol_fn, executable, module_name, symbol_name, agent, call_convention, symbol) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_symbol_get_info, hsa_executable_symbol_get_info, hsa_executable_symbol_get_info_fn, executable_symbol, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_iterate_symbols, hsa_executable_iterate_symbols, hsa_executable_iterate_symbols_fn, executable, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_status_string, hsa_status_string, hsa_status_string_fn, status, status_string) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_extension_get_name, hsa_extension_get_name, hsa_extension_get_name_fn, extension, name) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_system_major_extension_supported, hsa_system_major_extension_supported, hsa_system_major_extension_supported_fn, extension, version_major, version_minor, result) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_system_get_major_extension_table, hsa_system_get_major_extension_table, hsa_system_get_major_extension_table_fn, extension, version_major, table_length, table) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_agent_major_extension_supported, hsa_agent_major_extension_supported, hsa_agent_major_extension_supported_fn, extension, agent, version_major, version_minor, result) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_cache_get_info, hsa_cache_get_info, hsa_cache_get_info_fn, cache, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_agent_iterate_caches, hsa_agent_iterate_caches, hsa_agent_iterate_caches_fn, agent, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_silent_store_relaxed, hsa_signal_silent_store_relaxed, hsa_signal_silent_store_relaxed_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_silent_store_screlease, hsa_signal_silent_store_screlease, hsa_signal_silent_store_screlease_fn, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_group_create, hsa_signal_group_create, hsa_signal_group_create_fn, num_signals, signals, num_consumers, consumers, signal_group) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_group_destroy, hsa_signal_group_destroy, hsa_signal_group_destroy_fn, signal_group) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_group_wait_any_scacquire, hsa_signal_group_wait_any_scacquire, hsa_signal_group_wait_any_scacquire_fn, signal_group, conditions, compare_values, wait_state_hint, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_signal_group_wait_any_relaxed, hsa_signal_group_wait_any_relaxed, hsa_signal_group_wait_any_relaxed_fn, signal_group, conditions, compare_values, wait_state_hint, signal, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_agent_iterate_isas, hsa_agent_iterate_isas, hsa_agent_iterate_isas_fn, agent, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_isa_get_info_alt, hsa_isa_get_info_alt, hsa_isa_get_info_alt_fn, isa, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_isa_get_exception_policies, hsa_isa_get_exception_policies, hsa_isa_get_exception_policies_fn, isa, profile, mask) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_isa_get_round_method, hsa_isa_get_round_method, hsa_isa_get_round_method_fn, isa, fp_type, flush_mode, round_method) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_wavefront_get_info, hsa_wavefront_get_info, hsa_wavefront_get_info_fn, wavefront, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_isa_iterate_wavefronts, hsa_isa_iterate_wavefronts, hsa_isa_iterate_wavefronts_fn, isa, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_object_get_symbol_from_name, hsa_code_object_get_symbol_from_name, hsa_code_object_get_symbol_from_name_fn, code_object, module_name, symbol_name, symbol) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_object_reader_create_from_file, hsa_code_object_reader_create_from_file, hsa_code_object_reader_create_from_file_fn, file, code_object_reader) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_object_reader_create_from_memory, hsa_code_object_reader_create_from_memory, hsa_code_object_reader_create_from_memory_fn, code_object, size, code_object_reader) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_code_object_reader_destroy, hsa_code_object_reader_destroy, hsa_code_object_reader_destroy_fn, code_object_reader) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_create_alt, hsa_executable_create_alt, hsa_executable_create_alt_fn, profile, default_float_rounding_mode, options, executable) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_load_program_code_object, hsa_executable_load_program_code_object, hsa_executable_load_program_code_object_fn, executable, code_object_reader, options, loaded_code_object) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_load_agent_code_object, hsa_executable_load_agent_code_object, hsa_executable_load_agent_code_object_fn, executable, agent, code_object_reader, options, loaded_code_object) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_validate_alt, hsa_executable_validate_alt, hsa_executable_validate_alt_fn, executable, options, result) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_get_symbol_by_name, hsa_executable_get_symbol_by_name, hsa_executable_get_symbol_by_name_fn, executable, symbol_name, agent, symbol) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_iterate_agent_symbols, hsa_executable_iterate_agent_symbols, hsa_executable_iterate_agent_symbols_fn, executable, agent, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_CoreApi, ROCPROFILER_HSA_API_ID_hsa_executable_iterate_program_symbols, hsa_executable_iterate_program_symbols, hsa_executable_iterate_program_symbols_fn, executable, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_coherency_get_type, hsa_amd_coherency_get_type, hsa_amd_coherency_get_type_fn, agent, type) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_coherency_set_type, hsa_amd_coherency_set_type, hsa_amd_coherency_set_type_fn, agent, type) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_profiling_set_profiler_enabled, hsa_amd_profiling_set_profiler_enabled, hsa_amd_profiling_set_profiler_enabled_fn, queue, enable) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_profiling_async_copy_enable, hsa_amd_profiling_async_copy_enable, hsa_amd_profiling_async_copy_enable_fn, enable) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_profiling_get_dispatch_time, hsa_amd_profiling_get_dispatch_time, hsa_amd_profiling_get_dispatch_time_fn, agent, signal, time) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_profiling_get_async_copy_time, hsa_amd_profiling_get_async_copy_time, hsa_amd_profiling_get_async_copy_time_fn, signal, time) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_profiling_convert_tick_to_system_domain, hsa_amd_profiling_convert_tick_to_system_domain, hsa_amd_profiling_convert_tick_to_system_domain_fn, agent, agent_tick, system_tick) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_signal_async_handler, hsa_amd_signal_async_handler, hsa_amd_signal_async_handler_fn, signal, cond, value, handler, arg) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_async_function, hsa_amd_async_function, hsa_amd_async_function_fn, callback, arg) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_signal_wait_any, hsa_amd_signal_wait_any, hsa_amd_signal_wait_any_fn, signal_count, signals, conds, values, timeout_hint, wait_hint, satisfying_value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_queue_cu_set_mask, hsa_amd_queue_cu_set_mask, hsa_amd_queue_cu_set_mask_fn, queue, num_cu_mask_count, cu_mask) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_pool_get_info, hsa_amd_memory_pool_get_info, hsa_amd_memory_pool_get_info_fn, memory_pool, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_agent_iterate_memory_pools, hsa_amd_agent_iterate_memory_pools, hsa_amd_agent_iterate_memory_pools_fn, agent, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_pool_allocate, hsa_amd_memory_pool_allocate, hsa_amd_memory_pool_allocate_fn, memory_pool, size, flags, ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_pool_free, hsa_amd_memory_pool_free, hsa_amd_memory_pool_free_fn, ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_async_copy, hsa_amd_memory_async_copy, hsa_amd_memory_async_copy_fn, dst, dst_agent, src, src_agent, size, num_dep_signals, dep_signals, completion_signal) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_async_copy_on_engine, hsa_amd_memory_async_copy_on_engine, hsa_amd_memory_async_copy_on_engine_fn, dst, dst_agent, src, src_agent, size, num_dep_signals, dep_signals, completion_signal, engine_id, force_copy_on_sdma) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_copy_engine_status, hsa_amd_memory_copy_engine_status, hsa_amd_memory_copy_engine_status_fn, dst_agent, src_agent, engine_ids_mask) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_agent_memory_pool_get_info, hsa_amd_agent_memory_pool_get_info, hsa_amd_agent_memory_pool_get_info_fn, agent, memory_pool, attribute, value) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_agents_allow_access, hsa_amd_agents_allow_access, hsa_amd_agents_allow_access_fn, num_agents, agents, flags, ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_pool_can_migrate, hsa_amd_memory_pool_can_migrate, hsa_amd_memory_pool_can_migrate_fn, src_memory_pool, dst_memory_pool, result) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_migrate, hsa_amd_memory_migrate, hsa_amd_memory_migrate_fn, ptr, memory_pool, flags) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_lock, hsa_amd_memory_lock, hsa_amd_memory_lock_fn, host_ptr, size, agents, num_agent, agent_ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_unlock, hsa_amd_memory_unlock, hsa_amd_memory_unlock_fn, host_ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_fill, hsa_amd_memory_fill, hsa_amd_memory_fill_fn, ptr, value, count) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_interop_map_buffer, hsa_amd_interop_map_buffer, hsa_amd_interop_map_buffer_fn, num_agents, agents, interop_handle, flags, size, ptr, metadata_size, metadata) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_interop_unmap_buffer, hsa_amd_interop_unmap_buffer, hsa_amd_interop_unmap_buffer_fn, ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_image_create, hsa_amd_image_create, hsa_amd_image_create_fn, agent, image_descriptor, image_layout, image_data, access_permission, image) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_pointer_info, hsa_amd_pointer_info, hsa_amd_pointer_info_fn, ptr, info, alloc, num_agents_accessible, accessible) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_pointer_info_set_userdata, hsa_amd_pointer_info_set_userdata, hsa_amd_pointer_info_set_userdata_fn, ptr, userdata) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_ipc_memory_create, hsa_amd_ipc_memory_create, hsa_amd_ipc_memory_create_fn, ptr, len, handle) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_ipc_memory_attach, hsa_amd_ipc_memory_attach, hsa_amd_ipc_memory_attach_fn, handle, len, num_agents, mapping_agents, mapped_ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_ipc_memory_detach, hsa_amd_ipc_memory_detach, hsa_amd_ipc_memory_detach_fn, mapped_ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_signal_create, hsa_amd_signal_create, hsa_amd_signal_create_fn, initial_value, num_consumers, consumers, attributes, signal) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_ipc_signal_create, hsa_amd_ipc_signal_create, hsa_amd_ipc_signal_create_fn, signal, handle) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_ipc_signal_attach, hsa_amd_ipc_signal_attach, hsa_amd_ipc_signal_attach_fn, handle, signal) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_register_system_event_handler, hsa_amd_register_system_event_handler, hsa_amd_register_system_event_handler_fn, callback, data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_queue_set_priority, hsa_amd_queue_set_priority, hsa_amd_queue_set_priority_fn, queue, priority) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_async_copy_rect, hsa_amd_memory_async_copy_rect, hsa_amd_memory_async_copy_rect_fn, dst, dst_offset, src, src_offset, range, copy_agent, dir, num_dep_signals, dep_signals, completion_signal) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_memory_lock_to_pool, hsa_amd_memory_lock_to_pool, hsa_amd_memory_lock_to_pool_fn, host_ptr, size, agents, num_agent, pool, flags, agent_ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_register_deallocation_callback, hsa_amd_register_deallocation_callback, hsa_amd_register_deallocation_callback_fn, ptr, callback, user_data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_deregister_deallocation_callback, hsa_amd_deregister_deallocation_callback, hsa_amd_deregister_deallocation_callback_fn, ptr, callback) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_signal_value_pointer, hsa_amd_signal_value_pointer, hsa_amd_signal_value_pointer_fn, signal, value_ptr) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_svm_attributes_set, hsa_amd_svm_attributes_set, hsa_amd_svm_attributes_set_fn, ptr, size, attribute_list, attribute_count) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_svm_attributes_get, hsa_amd_svm_attributes_get, hsa_amd_svm_attributes_get_fn, ptr, size, attribute_list, attribute_count) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_svm_prefetch_async, hsa_amd_svm_prefetch_async, hsa_amd_svm_prefetch_async_fn, ptr, size, agent, num_dep_signals, dep_signals, completion_signal) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_spm_acquire, hsa_amd_spm_acquire, hsa_amd_spm_acquire_fn, preferred_agent) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_spm_release, hsa_amd_spm_release, hsa_amd_spm_release_fn, preferred_agent) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_spm_set_dest_buffer, hsa_amd_spm_set_dest_buffer, hsa_amd_spm_set_dest_buffer_fn, preferred_agent, size_in_bytes, timeout, size_copied, dest, is_data_loss) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_queue_cu_get_mask, hsa_amd_queue_cu_get_mask, hsa_amd_queue_cu_get_mask_fn, queue, num_cu_mask_count, cu_mask) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_portable_export_dmabuf, hsa_amd_portable_export_dmabuf, hsa_amd_portable_export_dmabuf_fn, ptr, size, dmabuf, offset) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_portable_close_dmabuf, hsa_amd_portable_close_dmabuf, hsa_amd_portable_close_dmabuf_fn, dmabuf) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_get_capability, hsa_ext_image_get_capability, hsa_ext_image_get_capability_fn, agent, geometry, image_format, capability_mask) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_data_get_info, hsa_ext_image_data_get_info, hsa_ext_image_data_get_info_fn, agent, image_descriptor, access_permission, image_data_info) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_create, hsa_ext_image_create, hsa_ext_image_create_fn, agent, image_descriptor, image_data, access_permission, image) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_import, hsa_ext_image_import, hsa_ext_image_import_fn, agent, src_memory, src_row_pitch, src_slice_pitch, dst_image, image_region) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_export, hsa_ext_image_export, hsa_ext_image_export_fn, agent, src_image, dst_memory, dst_row_pitch, dst_slice_pitch, image_region) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_copy, hsa_ext_image_copy, hsa_ext_image_copy_fn, agent, src_image, src_offset, dst_image, dst_offset, range) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_clear, hsa_ext_image_clear, hsa_ext_image_clear_fn, agent, image, data, image_region) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_destroy, hsa_ext_image_destroy, hsa_ext_image_destroy_fn, agent, image) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_sampler_create, hsa_ext_sampler_create, hsa_ext_sampler_create_fn, agent, sampler_descriptor, sampler) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_sampler_destroy, hsa_ext_sampler_destroy, hsa_ext_sampler_destroy_fn, agent, sampler) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_get_capability_with_layout, hsa_ext_image_get_capability_with_layout, hsa_ext_image_get_capability_with_layout_fn, agent, geometry, image_format, image_data_layout, capability_mask) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_data_get_info_with_layout, hsa_ext_image_data_get_info_with_layout, hsa_ext_image_data_get_info_with_layout_fn, agent, image_descriptor, access_permission, image_data_layout, image_data_row_pitch, image_data_slice_pitch, image_data_info) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_ImageExt, ROCPROFILER_HSA_API_ID_hsa_ext_image_create_with_layout, hsa_ext_image_create_with_layout, hsa_ext_image_create_with_layout_fn, agent, image_descriptor, image_data, access_permission, image_data_layout, image_data_row_pitch, image_data_slice_pitch, image) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_queue_intercept_create, hsa_amd_queue_intercept_create, hsa_amd_queue_intercept_create_fn, agent_handle, size, type, callback, data, private_segment_size, group_segment_size, queue) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_queue_intercept_register, hsa_amd_queue_intercept_register, hsa_amd_queue_intercept_register_fn, queue, callback, user_data) +HSA_API_INFO_DEFINITION_V(ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, ROCPROFILER_HSA_API_TABLE_ID_AmdExt, ROCPROFILER_HSA_API_ID_hsa_amd_runtime_queue_create_register, hsa_amd_runtime_queue_create_register, hsa_amd_runtime_queue_create_register_fn, callback, user_data) +// clang-format on diff --git a/source/lib/rocprofiler/hsa/hsa.gen.cpp b/source/lib/rocprofiler/hsa/hsa.gen.cpp deleted file mode 100644 index 2643bc81da..0000000000 --- a/source/lib/rocprofiler/hsa/hsa.gen.cpp +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) 2018-2023 Advanced Micro Devices, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#include "hsa.hpp" - -// clang-format off -HSA_API_INFO_DEFINITION_0(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_init, hsa_init, hsa_init_fn) -HSA_API_INFO_DEFINITION_0(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_shut_down, hsa_shut_down, hsa_shut_down_fn) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_system_get_info, hsa_system_get_info, hsa_system_get_info_fn, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_system_extension_supported, hsa_system_extension_supported, hsa_system_extension_supported_fn, extension, version_major, version_minor, result) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_system_get_extension_table, hsa_system_get_extension_table, hsa_system_get_extension_table_fn, extension, version_major, version_minor, table) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_iterate_agents, hsa_iterate_agents, hsa_iterate_agents_fn, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_agent_get_info, hsa_agent_get_info, hsa_agent_get_info_fn, agent, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_create, hsa_queue_create, hsa_queue_create_fn, agent, size, type, callback, data, private_segment_size, group_segment_size, queue) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_soft_queue_create, hsa_soft_queue_create, hsa_soft_queue_create_fn, region, size, type, features, doorbell_signal, queue) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_destroy, hsa_queue_destroy, hsa_queue_destroy_fn, queue) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_inactivate, hsa_queue_inactivate, hsa_queue_inactivate_fn, queue) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_load_read_index_scacquire, hsa_queue_load_read_index_scacquire, hsa_queue_load_read_index_scacquire_fn, queue) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_load_read_index_relaxed, hsa_queue_load_read_index_relaxed, hsa_queue_load_read_index_relaxed_fn, queue) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_load_write_index_scacquire, hsa_queue_load_write_index_scacquire, hsa_queue_load_write_index_scacquire_fn, queue) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_load_write_index_relaxed, hsa_queue_load_write_index_relaxed, hsa_queue_load_write_index_relaxed_fn, queue) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_store_write_index_relaxed, hsa_queue_store_write_index_relaxed, hsa_queue_store_write_index_relaxed_fn, queue, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_store_write_index_screlease, hsa_queue_store_write_index_screlease, hsa_queue_store_write_index_screlease_fn, queue, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_cas_write_index_scacq_screl, hsa_queue_cas_write_index_scacq_screl, hsa_queue_cas_write_index_scacq_screl_fn, queue, expected, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_cas_write_index_scacquire, hsa_queue_cas_write_index_scacquire, hsa_queue_cas_write_index_scacquire_fn, queue, expected, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_cas_write_index_relaxed, hsa_queue_cas_write_index_relaxed, hsa_queue_cas_write_index_relaxed_fn, queue, expected, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_cas_write_index_screlease, hsa_queue_cas_write_index_screlease, hsa_queue_cas_write_index_screlease_fn, queue, expected, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_add_write_index_scacq_screl, hsa_queue_add_write_index_scacq_screl, hsa_queue_add_write_index_scacq_screl_fn, queue, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_add_write_index_scacquire, hsa_queue_add_write_index_scacquire, hsa_queue_add_write_index_scacquire_fn, queue, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_add_write_index_relaxed, hsa_queue_add_write_index_relaxed, hsa_queue_add_write_index_relaxed_fn, queue, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_add_write_index_screlease, hsa_queue_add_write_index_screlease, hsa_queue_add_write_index_screlease_fn, queue, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_store_read_index_relaxed, hsa_queue_store_read_index_relaxed, hsa_queue_store_read_index_relaxed_fn, queue, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_queue_store_read_index_screlease, hsa_queue_store_read_index_screlease, hsa_queue_store_read_index_screlease_fn, queue, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_agent_iterate_regions, hsa_agent_iterate_regions, hsa_agent_iterate_regions_fn, agent, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_region_get_info, hsa_region_get_info, hsa_region_get_info_fn, region, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_agent_get_exception_policies, hsa_agent_get_exception_policies, hsa_agent_get_exception_policies_fn, agent, profile, mask) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_agent_extension_supported, hsa_agent_extension_supported, hsa_agent_extension_supported_fn, extension, agent, version_major, version_minor, result) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_memory_register, hsa_memory_register, hsa_memory_register_fn, ptr, size) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_memory_deregister, hsa_memory_deregister, hsa_memory_deregister_fn, ptr, size) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_memory_allocate, hsa_memory_allocate, hsa_memory_allocate_fn, region, size, ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_memory_free, hsa_memory_free, hsa_memory_free_fn, ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_memory_copy, hsa_memory_copy, hsa_memory_copy_fn, dst, src, size) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_memory_assign_agent, hsa_memory_assign_agent, hsa_memory_assign_agent_fn, ptr, agent, access) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_create, hsa_signal_create, hsa_signal_create_fn, initial_value, num_consumers, consumers, signal) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_destroy, hsa_signal_destroy, hsa_signal_destroy_fn, signal) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_load_relaxed, hsa_signal_load_relaxed, hsa_signal_load_relaxed_fn, signal) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_load_scacquire, hsa_signal_load_scacquire, hsa_signal_load_scacquire_fn, signal) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_store_relaxed, hsa_signal_store_relaxed, hsa_signal_store_relaxed_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_store_screlease, hsa_signal_store_screlease, hsa_signal_store_screlease_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_wait_relaxed, hsa_signal_wait_relaxed, hsa_signal_wait_relaxed_fn, signal, condition, compare_value, timeout_hint, wait_state_hint) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_wait_scacquire, hsa_signal_wait_scacquire, hsa_signal_wait_scacquire_fn, signal, condition, compare_value, timeout_hint, wait_state_hint) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_and_relaxed, hsa_signal_and_relaxed, hsa_signal_and_relaxed_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_and_scacquire, hsa_signal_and_scacquire, hsa_signal_and_scacquire_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_and_screlease, hsa_signal_and_screlease, hsa_signal_and_screlease_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_and_scacq_screl, hsa_signal_and_scacq_screl, hsa_signal_and_scacq_screl_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_or_relaxed, hsa_signal_or_relaxed, hsa_signal_or_relaxed_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_or_scacquire, hsa_signal_or_scacquire, hsa_signal_or_scacquire_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_or_screlease, hsa_signal_or_screlease, hsa_signal_or_screlease_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_or_scacq_screl, hsa_signal_or_scacq_screl, hsa_signal_or_scacq_screl_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_xor_relaxed, hsa_signal_xor_relaxed, hsa_signal_xor_relaxed_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_xor_scacquire, hsa_signal_xor_scacquire, hsa_signal_xor_scacquire_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_xor_screlease, hsa_signal_xor_screlease, hsa_signal_xor_screlease_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_xor_scacq_screl, hsa_signal_xor_scacq_screl, hsa_signal_xor_scacq_screl_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_exchange_relaxed, hsa_signal_exchange_relaxed, hsa_signal_exchange_relaxed_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_exchange_scacquire, hsa_signal_exchange_scacquire, hsa_signal_exchange_scacquire_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_exchange_screlease, hsa_signal_exchange_screlease, hsa_signal_exchange_screlease_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_exchange_scacq_screl, hsa_signal_exchange_scacq_screl, hsa_signal_exchange_scacq_screl_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_add_relaxed, hsa_signal_add_relaxed, hsa_signal_add_relaxed_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_add_scacquire, hsa_signal_add_scacquire, hsa_signal_add_scacquire_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_add_screlease, hsa_signal_add_screlease, hsa_signal_add_screlease_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_add_scacq_screl, hsa_signal_add_scacq_screl, hsa_signal_add_scacq_screl_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_subtract_relaxed, hsa_signal_subtract_relaxed, hsa_signal_subtract_relaxed_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_subtract_scacquire, hsa_signal_subtract_scacquire, hsa_signal_subtract_scacquire_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_subtract_screlease, hsa_signal_subtract_screlease, hsa_signal_subtract_screlease_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_subtract_scacq_screl, hsa_signal_subtract_scacq_screl, hsa_signal_subtract_scacq_screl_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_cas_relaxed, hsa_signal_cas_relaxed, hsa_signal_cas_relaxed_fn, signal, expected, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_cas_scacquire, hsa_signal_cas_scacquire, hsa_signal_cas_scacquire_fn, signal, expected, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_cas_screlease, hsa_signal_cas_screlease, hsa_signal_cas_screlease_fn, signal, expected, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_cas_scacq_screl, hsa_signal_cas_scacq_screl, hsa_signal_cas_scacq_screl_fn, signal, expected, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_isa_from_name, hsa_isa_from_name, hsa_isa_from_name_fn, name, isa) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_isa_get_info, hsa_isa_get_info, hsa_isa_get_info_fn, isa, attribute, index, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_isa_compatible, hsa_isa_compatible, hsa_isa_compatible_fn, code_object_isa, agent_isa, result) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_object_serialize, hsa_code_object_serialize, hsa_code_object_serialize_fn, code_object, alloc_callback, callback_data, options, serialized_code_object, serialized_code_object_size) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_object_deserialize, hsa_code_object_deserialize, hsa_code_object_deserialize_fn, serialized_code_object, serialized_code_object_size, options, code_object) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_object_destroy, hsa_code_object_destroy, hsa_code_object_destroy_fn, code_object) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_object_get_info, hsa_code_object_get_info, hsa_code_object_get_info_fn, code_object, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_object_get_symbol, hsa_code_object_get_symbol, hsa_code_object_get_symbol_fn, code_object, symbol_name, symbol) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_symbol_get_info, hsa_code_symbol_get_info, hsa_code_symbol_get_info_fn, code_symbol, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_object_iterate_symbols, hsa_code_object_iterate_symbols, hsa_code_object_iterate_symbols_fn, code_object, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_create, hsa_executable_create, hsa_executable_create_fn, profile, executable_state, options, executable) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_destroy, hsa_executable_destroy, hsa_executable_destroy_fn, executable) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_load_code_object, hsa_executable_load_code_object, hsa_executable_load_code_object_fn, executable, agent, code_object, options) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_freeze, hsa_executable_freeze, hsa_executable_freeze_fn, executable, options) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_get_info, hsa_executable_get_info, hsa_executable_get_info_fn, executable, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_global_variable_define, hsa_executable_global_variable_define, hsa_executable_global_variable_define_fn, executable, variable_name, address) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_agent_global_variable_define, hsa_executable_agent_global_variable_define, hsa_executable_agent_global_variable_define_fn, executable, agent, variable_name, address) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_readonly_variable_define, hsa_executable_readonly_variable_define, hsa_executable_readonly_variable_define_fn, executable, agent, variable_name, address) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_validate, hsa_executable_validate, hsa_executable_validate_fn, executable, result) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_get_symbol, hsa_executable_get_symbol, hsa_executable_get_symbol_fn, executable, module_name, symbol_name, agent, call_convention, symbol) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_symbol_get_info, hsa_executable_symbol_get_info, hsa_executable_symbol_get_info_fn, executable_symbol, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_iterate_symbols, hsa_executable_iterate_symbols, hsa_executable_iterate_symbols_fn, executable, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_status_string, hsa_status_string, hsa_status_string_fn, status, status_string) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_extension_get_name, hsa_extension_get_name, hsa_extension_get_name_fn, extension, name) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_system_major_extension_supported, hsa_system_major_extension_supported, hsa_system_major_extension_supported_fn, extension, version_major, version_minor, result) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_system_get_major_extension_table, hsa_system_get_major_extension_table, hsa_system_get_major_extension_table_fn, extension, version_major, table_length, table) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_agent_major_extension_supported, hsa_agent_major_extension_supported, hsa_agent_major_extension_supported_fn, extension, agent, version_major, version_minor, result) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_cache_get_info, hsa_cache_get_info, hsa_cache_get_info_fn, cache, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_agent_iterate_caches, hsa_agent_iterate_caches, hsa_agent_iterate_caches_fn, agent, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_silent_store_relaxed, hsa_signal_silent_store_relaxed, hsa_signal_silent_store_relaxed_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_silent_store_screlease, hsa_signal_silent_store_screlease, hsa_signal_silent_store_screlease_fn, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_group_create, hsa_signal_group_create, hsa_signal_group_create_fn, num_signals, signals, num_consumers, consumers, signal_group) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_group_destroy, hsa_signal_group_destroy, hsa_signal_group_destroy_fn, signal_group) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_group_wait_any_scacquire, hsa_signal_group_wait_any_scacquire, hsa_signal_group_wait_any_scacquire_fn, signal_group, conditions, compare_values, wait_state_hint, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_signal_group_wait_any_relaxed, hsa_signal_group_wait_any_relaxed, hsa_signal_group_wait_any_relaxed_fn, signal_group, conditions, compare_values, wait_state_hint, signal, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_agent_iterate_isas, hsa_agent_iterate_isas, hsa_agent_iterate_isas_fn, agent, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_isa_get_info_alt, hsa_isa_get_info_alt, hsa_isa_get_info_alt_fn, isa, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_isa_get_exception_policies, hsa_isa_get_exception_policies, hsa_isa_get_exception_policies_fn, isa, profile, mask) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_isa_get_round_method, hsa_isa_get_round_method, hsa_isa_get_round_method_fn, isa, fp_type, flush_mode, round_method) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_wavefront_get_info, hsa_wavefront_get_info, hsa_wavefront_get_info_fn, wavefront, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_isa_iterate_wavefronts, hsa_isa_iterate_wavefronts, hsa_isa_iterate_wavefronts_fn, isa, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_object_get_symbol_from_name, hsa_code_object_get_symbol_from_name, hsa_code_object_get_symbol_from_name_fn, code_object, module_name, symbol_name, symbol) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_object_reader_create_from_file, hsa_code_object_reader_create_from_file, hsa_code_object_reader_create_from_file_fn, file, code_object_reader) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_object_reader_create_from_memory, hsa_code_object_reader_create_from_memory, hsa_code_object_reader_create_from_memory_fn, code_object, size, code_object_reader) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_code_object_reader_destroy, hsa_code_object_reader_destroy, hsa_code_object_reader_destroy_fn, code_object_reader) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_create_alt, hsa_executable_create_alt, hsa_executable_create_alt_fn, profile, default_float_rounding_mode, options, executable) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_load_program_code_object, hsa_executable_load_program_code_object, hsa_executable_load_program_code_object_fn, executable, code_object_reader, options, loaded_code_object) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_load_agent_code_object, hsa_executable_load_agent_code_object, hsa_executable_load_agent_code_object_fn, executable, agent, code_object_reader, options, loaded_code_object) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_validate_alt, hsa_executable_validate_alt, hsa_executable_validate_alt_fn, executable, options, result) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_get_symbol_by_name, hsa_executable_get_symbol_by_name, hsa_executable_get_symbol_by_name_fn, executable, symbol_name, agent, symbol) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_iterate_agent_symbols, hsa_executable_iterate_agent_symbols, hsa_executable_iterate_agent_symbols_fn, executable, agent, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_CoreApi, HSA_API_ID_hsa_executable_iterate_program_symbols, hsa_executable_iterate_program_symbols, hsa_executable_iterate_program_symbols_fn, executable, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_coherency_get_type, hsa_amd_coherency_get_type, hsa_amd_coherency_get_type_fn, agent, type) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_coherency_set_type, hsa_amd_coherency_set_type, hsa_amd_coherency_set_type_fn, agent, type) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_profiling_set_profiler_enabled, hsa_amd_profiling_set_profiler_enabled, hsa_amd_profiling_set_profiler_enabled_fn, queue, enable) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_profiling_async_copy_enable, hsa_amd_profiling_async_copy_enable, hsa_amd_profiling_async_copy_enable_fn, enable) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_profiling_get_dispatch_time, hsa_amd_profiling_get_dispatch_time, hsa_amd_profiling_get_dispatch_time_fn, agent, signal, time) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_profiling_get_async_copy_time, hsa_amd_profiling_get_async_copy_time, hsa_amd_profiling_get_async_copy_time_fn, signal, time) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_profiling_convert_tick_to_system_domain, hsa_amd_profiling_convert_tick_to_system_domain, hsa_amd_profiling_convert_tick_to_system_domain_fn, agent, agent_tick, system_tick) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_signal_async_handler, hsa_amd_signal_async_handler, hsa_amd_signal_async_handler_fn, signal, cond, value, handler, arg) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_async_function, hsa_amd_async_function, hsa_amd_async_function_fn, callback, arg) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_signal_wait_any, hsa_amd_signal_wait_any, hsa_amd_signal_wait_any_fn, signal_count, signals, conds, values, timeout_hint, wait_hint, satisfying_value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_queue_cu_set_mask, hsa_amd_queue_cu_set_mask, hsa_amd_queue_cu_set_mask_fn, queue, num_cu_mask_count, cu_mask) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_pool_get_info, hsa_amd_memory_pool_get_info, hsa_amd_memory_pool_get_info_fn, memory_pool, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_agent_iterate_memory_pools, hsa_amd_agent_iterate_memory_pools, hsa_amd_agent_iterate_memory_pools_fn, agent, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_pool_allocate, hsa_amd_memory_pool_allocate, hsa_amd_memory_pool_allocate_fn, memory_pool, size, flags, ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_pool_free, hsa_amd_memory_pool_free, hsa_amd_memory_pool_free_fn, ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_async_copy, hsa_amd_memory_async_copy, hsa_amd_memory_async_copy_fn, dst, dst_agent, src, src_agent, size, num_dep_signals, dep_signals, completion_signal) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_async_copy_on_engine, hsa_amd_memory_async_copy_on_engine, hsa_amd_memory_async_copy_on_engine_fn, dst, dst_agent, src, src_agent, size, num_dep_signals, dep_signals, completion_signal, engine_id, force_copy_on_sdma) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_copy_engine_status, hsa_amd_memory_copy_engine_status, hsa_amd_memory_copy_engine_status_fn, dst_agent, src_agent, engine_ids_mask) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_agent_memory_pool_get_info, hsa_amd_agent_memory_pool_get_info, hsa_amd_agent_memory_pool_get_info_fn, agent, memory_pool, attribute, value) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_agents_allow_access, hsa_amd_agents_allow_access, hsa_amd_agents_allow_access_fn, num_agents, agents, flags, ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_pool_can_migrate, hsa_amd_memory_pool_can_migrate, hsa_amd_memory_pool_can_migrate_fn, src_memory_pool, dst_memory_pool, result) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_migrate, hsa_amd_memory_migrate, hsa_amd_memory_migrate_fn, ptr, memory_pool, flags) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_lock, hsa_amd_memory_lock, hsa_amd_memory_lock_fn, host_ptr, size, agents, num_agent, agent_ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_unlock, hsa_amd_memory_unlock, hsa_amd_memory_unlock_fn, host_ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_fill, hsa_amd_memory_fill, hsa_amd_memory_fill_fn, ptr, value, count) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_interop_map_buffer, hsa_amd_interop_map_buffer, hsa_amd_interop_map_buffer_fn, num_agents, agents, interop_handle, flags, size, ptr, metadata_size, metadata) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_interop_unmap_buffer, hsa_amd_interop_unmap_buffer, hsa_amd_interop_unmap_buffer_fn, ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_image_create, hsa_amd_image_create, hsa_amd_image_create_fn, agent, image_descriptor, image_layout, image_data, access_permission, image) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_pointer_info, hsa_amd_pointer_info, hsa_amd_pointer_info_fn, ptr, info, alloc, num_agents_accessible, accessible) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_pointer_info_set_userdata, hsa_amd_pointer_info_set_userdata, hsa_amd_pointer_info_set_userdata_fn, ptr, userdata) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_ipc_memory_create, hsa_amd_ipc_memory_create, hsa_amd_ipc_memory_create_fn, ptr, len, handle) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_ipc_memory_attach, hsa_amd_ipc_memory_attach, hsa_amd_ipc_memory_attach_fn, handle, len, num_agents, mapping_agents, mapped_ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_ipc_memory_detach, hsa_amd_ipc_memory_detach, hsa_amd_ipc_memory_detach_fn, mapped_ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_signal_create, hsa_amd_signal_create, hsa_amd_signal_create_fn, initial_value, num_consumers, consumers, attributes, signal) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_ipc_signal_create, hsa_amd_ipc_signal_create, hsa_amd_ipc_signal_create_fn, signal, handle) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_ipc_signal_attach, hsa_amd_ipc_signal_attach, hsa_amd_ipc_signal_attach_fn, handle, signal) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_register_system_event_handler, hsa_amd_register_system_event_handler, hsa_amd_register_system_event_handler_fn, callback, data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_queue_set_priority, hsa_amd_queue_set_priority, hsa_amd_queue_set_priority_fn, queue, priority) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_async_copy_rect, hsa_amd_memory_async_copy_rect, hsa_amd_memory_async_copy_rect_fn, dst, dst_offset, src, src_offset, range, copy_agent, dir, num_dep_signals, dep_signals, completion_signal) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_memory_lock_to_pool, hsa_amd_memory_lock_to_pool, hsa_amd_memory_lock_to_pool_fn, host_ptr, size, agents, num_agent, pool, flags, agent_ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_register_deallocation_callback, hsa_amd_register_deallocation_callback, hsa_amd_register_deallocation_callback_fn, ptr, callback, user_data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_deregister_deallocation_callback, hsa_amd_deregister_deallocation_callback, hsa_amd_deregister_deallocation_callback_fn, ptr, callback) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_signal_value_pointer, hsa_amd_signal_value_pointer, hsa_amd_signal_value_pointer_fn, signal, value_ptr) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_svm_attributes_set, hsa_amd_svm_attributes_set, hsa_amd_svm_attributes_set_fn, ptr, size, attribute_list, attribute_count) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_svm_attributes_get, hsa_amd_svm_attributes_get, hsa_amd_svm_attributes_get_fn, ptr, size, attribute_list, attribute_count) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_svm_prefetch_async, hsa_amd_svm_prefetch_async, hsa_amd_svm_prefetch_async_fn, ptr, size, agent, num_dep_signals, dep_signals, completion_signal) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_spm_acquire, hsa_amd_spm_acquire, hsa_amd_spm_acquire_fn, preferred_agent) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_spm_release, hsa_amd_spm_release, hsa_amd_spm_release_fn, preferred_agent) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_spm_set_dest_buffer, hsa_amd_spm_set_dest_buffer, hsa_amd_spm_set_dest_buffer_fn, preferred_agent, size_in_bytes, timeout, size_copied, dest, is_data_loss) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_queue_cu_get_mask, hsa_amd_queue_cu_get_mask, hsa_amd_queue_cu_get_mask_fn, queue, num_cu_mask_count, cu_mask) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_portable_export_dmabuf, hsa_amd_portable_export_dmabuf, hsa_amd_portable_export_dmabuf_fn, ptr, size, dmabuf, offset) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_portable_close_dmabuf, hsa_amd_portable_close_dmabuf, hsa_amd_portable_close_dmabuf_fn, dmabuf) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_get_capability, hsa_ext_image_get_capability, hsa_ext_image_get_capability_fn, agent, geometry, image_format, capability_mask) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_data_get_info, hsa_ext_image_data_get_info, hsa_ext_image_data_get_info_fn, agent, image_descriptor, access_permission, image_data_info) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_create, hsa_ext_image_create, hsa_ext_image_create_fn, agent, image_descriptor, image_data, access_permission, image) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_import, hsa_ext_image_import, hsa_ext_image_import_fn, agent, src_memory, src_row_pitch, src_slice_pitch, dst_image, image_region) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_export, hsa_ext_image_export, hsa_ext_image_export_fn, agent, src_image, dst_memory, dst_row_pitch, dst_slice_pitch, image_region) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_copy, hsa_ext_image_copy, hsa_ext_image_copy_fn, agent, src_image, src_offset, dst_image, dst_offset, range) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_clear, hsa_ext_image_clear, hsa_ext_image_clear_fn, agent, image, data, image_region) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_destroy, hsa_ext_image_destroy, hsa_ext_image_destroy_fn, agent, image) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_sampler_create, hsa_ext_sampler_create, hsa_ext_sampler_create_fn, agent, sampler_descriptor, sampler) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_sampler_destroy, hsa_ext_sampler_destroy, hsa_ext_sampler_destroy_fn, agent, sampler) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_get_capability_with_layout, hsa_ext_image_get_capability_with_layout, hsa_ext_image_get_capability_with_layout_fn, agent, geometry, image_format, image_data_layout, capability_mask) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_data_get_info_with_layout, hsa_ext_image_data_get_info_with_layout, hsa_ext_image_data_get_info_with_layout_fn, agent, image_descriptor, access_permission, image_data_layout, image_data_row_pitch, image_data_slice_pitch, image_data_info) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_ImageExt, HSA_API_ID_hsa_ext_image_create_with_layout, hsa_ext_image_create_with_layout, hsa_ext_image_create_with_layout_fn, agent, image_descriptor, image_data, access_permission, image_data_layout, image_data_row_pitch, image_data_slice_pitch, image) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_queue_intercept_create, hsa_amd_queue_intercept_create, hsa_amd_queue_intercept_create_fn, agent_handle, size, type, callback, data, private_segment_size, group_segment_size, queue) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_queue_intercept_register, hsa_amd_queue_intercept_register, hsa_amd_queue_intercept_register_fn, queue, callback, user_data) -HSA_API_INFO_DEFINITION_V(ACTIVITY_DOMAIN_HSA_API, HSA_API_TABLE_ID_AmdExt, HSA_API_ID_hsa_amd_runtime_queue_create_register, hsa_amd_runtime_queue_create_register, hsa_amd_runtime_queue_create_register_fn, callback, user_data) -// clang-format on diff --git a/source/lib/rocprofiler/hsa/hsa.hpp b/source/lib/rocprofiler/hsa/hsa.hpp index 9b77118a93..138fed459e 100644 --- a/source/lib/rocprofiler/hsa/hsa.hpp +++ b/source/lib/rocprofiler/hsa/hsa.hpp @@ -20,16 +20,10 @@ #pragma once -#include "lib/common/defines.hpp" -#include "lib/rocprofiler/hsa/hsa-defines.hpp" -#include "lib/rocprofiler/hsa/hsa-ostream.hpp" -#include "lib/rocprofiler/hsa/hsa-types.h" -#include "lib/rocprofiler/hsa/hsa-utils.hpp" - -#include #include #include +#include namespace rocprofiler { @@ -41,27 +35,8 @@ using activity_functor_t = int (*)(rocprofiler_tracer_activity_domain_t domain, using hsa_api_table_t = HsaApiTable; -struct hsa_trace_data_t -{ - hsa_api_data_t api_data; - uint64_t phase_enter_timestamp; - uint64_t phase_data; - - void (*phase_enter)(hsa_api_id_t operation_id, hsa_trace_data_t* data); - void (*phase_exit)(hsa_api_id_t operation_id, hsa_trace_data_t* data); -}; - -enum hsa_table_api_id_t -{ - HSA_API_TABLE_ID_CoreApi, - HSA_API_TABLE_ID_AmdExt, - HSA_API_TABLE_ID_ImageExt, - HSA_API_TABLE_ID_NUMBER, -}; - -template -void -set_data_retval(DataT&, Tp); +hsa_api_table_t& +get_table(); template struct hsa_table_lookup; @@ -92,14 +67,14 @@ uint32_t hsa_api_id_by_name(const char* name); std::string -hsa_api_data_string(uint32_t id, const hsa_trace_data_t& _data); +hsa_api_data_string(uint32_t id, const rocprofiler_hsa_trace_data_t& _data); std::string -hsa_api_named_data_string(uint32_t id, const hsa_trace_data_t& _data); +hsa_api_named_data_string(uint32_t id, const rocprofiler_hsa_trace_data_t& _data); void -hsa_api_iterate_args(uint32_t id, - const hsa_trace_data_t& _data, +hsa_api_iterate_args(uint32_t id, + const rocprofiler_hsa_trace_data_t& _data, int (*_func)(const char*, const char*)); std::vector diff --git a/source/lib/rocprofiler/hsa/hsa-ostream.hpp b/source/lib/rocprofiler/hsa/ostream.hpp similarity index 100% rename from source/lib/rocprofiler/hsa/hsa-ostream.hpp rename to source/lib/rocprofiler/hsa/ostream.hpp diff --git a/source/lib/rocprofiler/hsa/types.hpp b/source/lib/rocprofiler/hsa/types.hpp new file mode 100644 index 0000000000..dcc7931c81 --- /dev/null +++ b/source/lib/rocprofiler/hsa/types.hpp @@ -0,0 +1,58 @@ +// Copyright (c) 2018-2023 Advanced Micro Devices, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#pragma once + +#include "rocprofiler/hsa.h" + +#if defined(ROCPROFILER_CI) && ROCPROFILER_CI > 0 +# if HSA_API_TABLE_MAJOR_VERSION <= 0x01 +static_assert(HSA_CORE_API_TABLE_MAJOR_VERSION == 0x01, + "Change in the major version of HSA core API table"); +static_assert(HSA_AMD_EXT_API_TABLE_MAJOR_VERSION == 0x01, + "Change in the major version of HSA amd-extended API table"); +static_assert(HSA_FINALIZER_API_TABLE_MAJOR_VERSION == 0x01, + "Change in the major version of HSA finalizer API table"); +static_assert(HSA_IMAGE_API_TABLE_MAJOR_VERSION == 0x01, + "Change in the major version of HSA image API table"); +static_assert(HSA_AQLPROFILE_API_TABLE_MAJOR_VERSION == 0x01, + "Change in the major version of HSA aqlprofile API table"); + +static_assert(HSA_CORE_API_TABLE_STEP_VERSION == 0x00, + "Change in the major version of HSA core API table"); +static_assert(HSA_AMD_EXT_API_TABLE_STEP_VERSION == 0x00, + "Change in the major version of HSA amd-extended API table"); +static_assert(HSA_FINALIZER_API_TABLE_STEP_VERSION == 0x00, + "Change in the major version of HSA finalizer API table"); +static_assert(HSA_IMAGE_API_TABLE_STEP_VERSION == 0x00, + "Change in the major version of HSA image API table"); +static_assert(HSA_AQLPROFILE_API_TABLE_STEP_VERSION == 0x00, + "Change in the major version of HSA aqlprofile API table"); + +// if you hit these static asserts, that means HSA added entries to the table but did not update the +// step numbers +static_assert(sizeof(FinalizerExtTable) == 64, "HSA finalizer API table size changed"); +static_assert(sizeof(ImageExtTable) == 120, "HSA image-extended API table size changed"); +static_assert(sizeof(AmdExtTable) == 456, "HSA amd-extended API table size changed"); +static_assert(sizeof(CoreApiTable) == 1016, "HSA core API table size changed"); +# else +# error "HSA_API_TABLE_MAJOR_VERSION not supported" +# endif +#endif diff --git a/source/lib/rocprofiler/hsa/hsa-utils.hpp b/source/lib/rocprofiler/hsa/utils.hpp similarity index 100% rename from source/lib/rocprofiler/hsa/hsa-utils.hpp rename to source/lib/rocprofiler/hsa/utils.hpp diff --git a/source/lib/rocprofiler/rocprofiler.cpp b/source/lib/rocprofiler/rocprofiler.cpp new file mode 100644 index 0000000000..6b51995dcc --- /dev/null +++ b/source/lib/rocprofiler/rocprofiler.cpp @@ -0,0 +1,147 @@ +// MIT License +// +// Copyright (c) 2023 ROCm Developer Tools +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#include + +#include +#include + +namespace +{ +template +auto +consume_args(Tp&&...) +{} +} // namespace + +extern "C" { +rocprofiler_status_t +rocprofiler_query_available_agents(rocprofiler_available_agents_cb_t callback, + size_t agent_size, + void* user_data) +{ + using pc_sampling_config_vec_t = std::vector; + + static const auto _default_pc_config = + rocprofiler_pc_sampling_configuration_t{ROCPROFILER_PC_SAMPLING_METHOD_HOST_TRAP, + ROCPROFILER_PC_SAMPLING_UNIT_TIME, + 1UL, + 1000000000UL, + 0}; + static const auto _dummy_pc_configs = pc_sampling_config_vec_t{_default_pc_config}; + + static auto _default_cpu_agent = rocprofiler_agent_t{rocprofiler_agent_id_t{0}, + ROCPROFILER_AGENT_TYPE_CPU, + "cpu", + rocprofiler_pc_sampling_config_array_t{}}; + static auto _default_gpu_agent = rocprofiler_agent_t{rocprofiler_agent_id_t{1}, + ROCPROFILER_AGENT_TYPE_GPU, + "gpu", + rocprofiler_pc_sampling_config_array_t{}}; + + // get the agents + auto _agents = std::vector{&_default_cpu_agent, &_default_gpu_agent}; + auto _pc_sampling_config = std::vector{}; + + for(auto* itr : _agents) + { + auto& _data = _pc_sampling_config.emplace_back(); + if(itr->type == ROCPROFILER_AGENT_TYPE_GPU) _data = {_default_pc_config}; + itr->pc_sampling_configs = + rocprofiler_pc_sampling_config_array_t{_data.data(), _data.size()}; + } + + assert(agent_size <= sizeof(rocprofiler_agent_t) && + "rocprofiler_agent_t used by caller is ABI-incompatible with rocprofiler_agent_t in " + "rocprofiler"); + return callback(_agents.data(), _agents.size(), user_data); +} + +rocprofiler_status_t +rocprofiler_create_context(rocprofiler_context_id_t* context_id) +{ + consume_args(context_id); + return ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED; +} + +rocprofiler_status_t +rocprofiler_start_context(rocprofiler_context_id_t context_id) +{ + consume_args(context_id); + return ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED; +} + +rocprofiler_status_t +rocprofiler_stop_context(rocprofiler_context_id_t context_id) +{ + consume_args(context_id); + return ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED; +} + +rocprofiler_status_t +rocprofiler_flush_buffer(rocprofiler_buffer_id_t buffer_id) +{ + consume_args(buffer_id); + return ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED; +} + +rocprofiler_status_t +rocprofiler_destroy_buffer(rocprofiler_buffer_id_t buffer_id) +{ + consume_args(buffer_id); + return ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED; +} + +rocprofiler_status_t +rocprofiler_create_buffer(rocprofiler_context_id_t context, + size_t size, + size_t watermark, + rocprofiler_buffer_policy_t action, + rocprofiler_buffer_callback_t callback, + void* callback_data, + rocprofiler_buffer_id_t* buffer_id) +{ + consume_args(context, size, watermark, action, callback, callback_data, buffer_id); + return ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED; +} + +rocprofiler_status_t +rocprofiler_configure_pc_sampling_service(rocprofiler_context_id_t context_id, + rocprofiler_agent_t agent, + rocprofiler_pc_sampling_method_t method, + rocprofiler_pc_sampling_unit_t unit, + uint64_t interval, + rocprofiler_buffer_id_t buffer_id) +{ + consume_args(context_id, agent, method, unit, interval, buffer_id); + return ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED; +} + +rocprofiler_status_t +rocprofiler_query_pc_sampling_agent_configurations(rocprofiler_agent_t agent, + rocprofiler_pc_sampling_configuration_t* config, + size_t* config_count) +{ + consume_args(agent, config, config_count); + return ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED; +} +} diff --git a/source/lib/rocprofiler/rocprofiler_config.cpp b/source/lib/rocprofiler/rocprofiler_config.cpp index b0d26aa0cb..5a29ac602f 100644 --- a/source/lib/rocprofiler/rocprofiler_config.cpp +++ b/source/lib/rocprofiler/rocprofiler_config.cpp @@ -58,3696 +58,6 @@ typedef struct roctx_api_data_s } args; } roctx_api_data_t; -typedef struct hsa_api_data_s -{ - uint64_t correlation_id; - uint32_t phase; - union - { - uint32_t uint32_t_retval; - hsa_signal_value_t hsa_signal_value_t_retval; - uint64_t uint64_t_retval; - hsa_status_t hsa_status_t_retval; - }; - union - { - /* block: CoreApi API */ - struct - { - } hsa_init; - struct - { - } hsa_shut_down; - struct - { - hsa_system_info_t attribute; - void* value; - } hsa_system_get_info; - struct - { - uint16_t extension; - uint16_t version_major; - uint16_t version_minor; - bool* result; - } hsa_system_extension_supported; - struct - { - uint16_t extension; - uint16_t version_major; - uint16_t version_minor; - void* table; - } hsa_system_get_extension_table; - struct - { - hsa_status_t (*callback)(hsa_agent_t agent, void* data); - void* data; - } hsa_iterate_agents; - struct - { - hsa_agent_t agent; - hsa_agent_info_t attribute; - void* value; - } hsa_agent_get_info; - struct - { - hsa_agent_t agent; - uint32_t size; - hsa_queue_type32_t type; - void (*callback)(hsa_status_t status, hsa_queue_t* source, void* data); - void* data; - uint32_t private_segment_size; - uint32_t group_segment_size; - hsa_queue_t** queue; - } hsa_queue_create; - struct - { - hsa_region_t region; - uint32_t size; - hsa_queue_type32_t type; - uint32_t features; - hsa_signal_t doorbell_signal; - hsa_queue_t** queue; - } hsa_soft_queue_create; - struct - { - hsa_queue_t* queue; - } hsa_queue_destroy; - struct - { - hsa_queue_t* queue; - } hsa_queue_inactivate; - struct - { - const hsa_queue_t* queue; - } hsa_queue_load_read_index_scacquire; - struct - { - const hsa_queue_t* queue; - } hsa_queue_load_read_index_relaxed; - struct - { - const hsa_queue_t* queue; - } hsa_queue_load_write_index_scacquire; - struct - { - const hsa_queue_t* queue; - } hsa_queue_load_write_index_relaxed; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_store_write_index_relaxed; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_store_write_index_screlease; - struct - { - const hsa_queue_t* queue; - uint64_t expected; - uint64_t value; - } hsa_queue_cas_write_index_scacq_screl; - struct - { - const hsa_queue_t* queue; - uint64_t expected; - uint64_t value; - } hsa_queue_cas_write_index_scacquire; - struct - { - const hsa_queue_t* queue; - uint64_t expected; - uint64_t value; - } hsa_queue_cas_write_index_relaxed; - struct - { - const hsa_queue_t* queue; - uint64_t expected; - uint64_t value; - } hsa_queue_cas_write_index_screlease; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_add_write_index_scacq_screl; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_add_write_index_scacquire; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_add_write_index_relaxed; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_add_write_index_screlease; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_store_read_index_relaxed; - struct - { - const hsa_queue_t* queue; - uint64_t value; - } hsa_queue_store_read_index_screlease; - struct - { - hsa_agent_t agent; - hsa_status_t (*callback)(hsa_region_t region, void* data); - void* data; - } hsa_agent_iterate_regions; - struct - { - hsa_region_t region; - hsa_region_info_t attribute; - void* value; - } hsa_region_get_info; - struct - { - hsa_agent_t agent; - hsa_profile_t profile; - uint16_t* mask; - } hsa_agent_get_exception_policies; - struct - { - uint16_t extension; - hsa_agent_t agent; - uint16_t version_major; - uint16_t version_minor; - bool* result; - } hsa_agent_extension_supported; - struct - { - void* ptr; - size_t size; - } hsa_memory_register; - struct - { - void* ptr; - size_t size; - } hsa_memory_deregister; - struct - { - hsa_region_t region; - size_t size; - void** ptr; - } hsa_memory_allocate; - struct - { - void* ptr; - } hsa_memory_free; - struct - { - void* dst; - const void* src; - size_t size; - } hsa_memory_copy; - struct - { - void* ptr; - hsa_agent_t agent; - hsa_access_permission_t access; - } hsa_memory_assign_agent; - struct - { - hsa_signal_value_t initial_value; - uint32_t num_consumers; - const hsa_agent_t* consumers; - hsa_signal_t* signal; - } hsa_signal_create; - struct - { - hsa_signal_t signal; - } hsa_signal_destroy; - struct - { - hsa_signal_t signal; - } hsa_signal_load_relaxed; - struct - { - hsa_signal_t signal; - } hsa_signal_load_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_store_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_store_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_condition_t condition; - hsa_signal_value_t compare_value; - uint64_t timeout_hint; - hsa_wait_state_t wait_state_hint; - } hsa_signal_wait_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_condition_t condition; - hsa_signal_value_t compare_value; - uint64_t timeout_hint; - hsa_wait_state_t wait_state_hint; - } hsa_signal_wait_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_and_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_and_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_and_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_and_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_or_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_or_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_or_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_or_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_xor_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_xor_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_xor_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_xor_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_exchange_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_exchange_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_exchange_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_exchange_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_add_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_add_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_add_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_add_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_subtract_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_subtract_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_subtract_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_subtract_scacq_screl; - struct - { - hsa_signal_t signal; - hsa_signal_value_t expected; - hsa_signal_value_t value; - } hsa_signal_cas_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t expected; - hsa_signal_value_t value; - } hsa_signal_cas_scacquire; - struct - { - hsa_signal_t signal; - hsa_signal_value_t expected; - hsa_signal_value_t value; - } hsa_signal_cas_screlease; - struct - { - hsa_signal_t signal; - hsa_signal_value_t expected; - hsa_signal_value_t value; - } hsa_signal_cas_scacq_screl; - struct - { - const char* name; - hsa_isa_t* isa; - } hsa_isa_from_name; - struct - { - hsa_isa_t isa; - hsa_isa_info_t attribute; - uint32_t index; - void* value; - } hsa_isa_get_info; - struct - { - hsa_isa_t code_object_isa; - hsa_isa_t agent_isa; - bool* result; - } hsa_isa_compatible; - struct - { - hsa_code_object_t code_object; - hsa_status_t (*alloc_callback)(size_t size, hsa_callback_data_t data, void** address); - hsa_callback_data_t callback_data; - const char* options; - void** serialized_code_object; - size_t* serialized_code_object_size; - } hsa_code_object_serialize; - struct - { - void* serialized_code_object; - size_t serialized_code_object_size; - const char* options; - hsa_code_object_t* code_object; - } hsa_code_object_deserialize; - struct - { - hsa_code_object_t code_object; - } hsa_code_object_destroy; - struct - { - hsa_code_object_t code_object; - hsa_code_object_info_t attribute; - void* value; - } hsa_code_object_get_info; - struct - { - hsa_code_object_t code_object; - const char* symbol_name; - hsa_code_symbol_t* symbol; - } hsa_code_object_get_symbol; - struct - { - hsa_code_symbol_t code_symbol; - hsa_code_symbol_info_t attribute; - void* value; - } hsa_code_symbol_get_info; - struct - { - hsa_code_object_t code_object; - hsa_status_t (*callback)(hsa_code_object_t code_object, - hsa_code_symbol_t symbol, - void* data); - void* data; - } hsa_code_object_iterate_symbols; - struct - { - hsa_profile_t profile; - hsa_executable_state_t executable_state; - const char* options; - hsa_executable_t* executable; - } hsa_executable_create; - struct - { - hsa_executable_t executable; - } hsa_executable_destroy; - struct - { - hsa_executable_t executable; - hsa_agent_t agent; - hsa_code_object_t code_object; - const char* options; - } hsa_executable_load_code_object; - struct - { - hsa_executable_t executable; - const char* options; - } hsa_executable_freeze; - struct - { - hsa_executable_t executable; - hsa_executable_info_t attribute; - void* value; - } hsa_executable_get_info; - struct - { - hsa_executable_t executable; - const char* variable_name; - void* address; - } hsa_executable_global_variable_define; - struct - { - hsa_executable_t executable; - hsa_agent_t agent; - const char* variable_name; - void* address; - } hsa_executable_agent_global_variable_define; - struct - { - hsa_executable_t executable; - hsa_agent_t agent; - const char* variable_name; - void* address; - } hsa_executable_readonly_variable_define; - struct - { - hsa_executable_t executable; - uint32_t* result; - } hsa_executable_validate; - struct - { - hsa_executable_t executable; - const char* module_name; - const char* symbol_name; - hsa_agent_t agent; - int32_t call_convention; - hsa_executable_symbol_t* symbol; - } hsa_executable_get_symbol; - struct - { - hsa_executable_symbol_t executable_symbol; - hsa_executable_symbol_info_t attribute; - void* value; - } hsa_executable_symbol_get_info; - struct - { - hsa_executable_t executable; - hsa_status_t (*callback)(hsa_executable_t exec, - hsa_executable_symbol_t symbol, - void* data); - void* data; - } hsa_executable_iterate_symbols; - struct - { - hsa_status_t status; - const char** status_string; - } hsa_status_string; - struct - { - uint16_t extension; - const char** name; - } hsa_extension_get_name; - struct - { - uint16_t extension; - uint16_t version_major; - uint16_t* version_minor; - bool* result; - } hsa_system_major_extension_supported; - struct - { - uint16_t extension; - uint16_t version_major; - size_t table_length; - void* table; - } hsa_system_get_major_extension_table; - struct - { - uint16_t extension; - hsa_agent_t agent; - uint16_t version_major; - uint16_t* version_minor; - bool* result; - } hsa_agent_major_extension_supported; - struct - { - hsa_cache_t cache; - hsa_cache_info_t attribute; - void* value; - } hsa_cache_get_info; - struct - { - hsa_agent_t agent; - hsa_status_t (*callback)(hsa_cache_t cache, void* data); - void* data; - } hsa_agent_iterate_caches; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_silent_store_relaxed; - struct - { - hsa_signal_t signal; - hsa_signal_value_t value; - } hsa_signal_silent_store_screlease; - struct - { - uint32_t num_signals; - const hsa_signal_t* signals; - uint32_t num_consumers; - const hsa_agent_t* consumers; - hsa_signal_group_t* signal_group; - } hsa_signal_group_create; - struct - { - hsa_signal_group_t signal_group; - } hsa_signal_group_destroy; - struct - { - hsa_signal_group_t signal_group; - const hsa_signal_condition_t* conditions; - const hsa_signal_value_t* compare_values; - hsa_wait_state_t wait_state_hint; - hsa_signal_t* signal; - hsa_signal_value_t* value; - } hsa_signal_group_wait_any_scacquire; - struct - { - hsa_signal_group_t signal_group; - const hsa_signal_condition_t* conditions; - const hsa_signal_value_t* compare_values; - hsa_wait_state_t wait_state_hint; - hsa_signal_t* signal; - hsa_signal_value_t* value; - } hsa_signal_group_wait_any_relaxed; - struct - { - hsa_agent_t agent; - hsa_status_t (*callback)(hsa_isa_t isa, void* data); - void* data; - } hsa_agent_iterate_isas; - struct - { - hsa_isa_t isa; - hsa_isa_info_t attribute; - void* value; - } hsa_isa_get_info_alt; - struct - { - hsa_isa_t isa; - hsa_profile_t profile; - uint16_t* mask; - } hsa_isa_get_exception_policies; - struct - { - hsa_isa_t isa; - hsa_fp_type_t fp_type; - hsa_flush_mode_t flush_mode; - hsa_round_method_t* round_method; - } hsa_isa_get_round_method; - struct - { - hsa_wavefront_t wavefront; - hsa_wavefront_info_t attribute; - void* value; - } hsa_wavefront_get_info; - struct - { - hsa_isa_t isa; - hsa_status_t (*callback)(hsa_wavefront_t wavefront, void* data); - void* data; - } hsa_isa_iterate_wavefronts; - struct - { - hsa_code_object_t code_object; - const char* module_name; - const char* symbol_name; - hsa_code_symbol_t* symbol; - } hsa_code_object_get_symbol_from_name; - struct - { - hsa_file_t file; - hsa_code_object_reader_t* code_object_reader; - } hsa_code_object_reader_create_from_file; - struct - { - const void* code_object; - size_t size; - hsa_code_object_reader_t* code_object_reader; - } hsa_code_object_reader_create_from_memory; - struct - { - hsa_code_object_reader_t code_object_reader; - } hsa_code_object_reader_destroy; - struct - { - hsa_profile_t profile; - hsa_default_float_rounding_mode_t default_float_rounding_mode; - const char* options; - hsa_executable_t* executable; - } hsa_executable_create_alt; - struct - { - hsa_executable_t executable; - hsa_code_object_reader_t code_object_reader; - const char* options; - hsa_loaded_code_object_t* loaded_code_object; - } hsa_executable_load_program_code_object; - struct - { - hsa_executable_t executable; - hsa_agent_t agent; - hsa_code_object_reader_t code_object_reader; - const char* options; - hsa_loaded_code_object_t* loaded_code_object; - } hsa_executable_load_agent_code_object; - struct - { - hsa_executable_t executable; - const char* options; - uint32_t* result; - } hsa_executable_validate_alt; - struct - { - hsa_executable_t executable; - const char* symbol_name; - const hsa_agent_t* agent; - hsa_executable_symbol_t* symbol; - } hsa_executable_get_symbol_by_name; - struct - { - hsa_executable_t executable; - hsa_agent_t agent; - hsa_status_t (*callback)(hsa_executable_t exec, - hsa_agent_t agent, - hsa_executable_symbol_t symbol, - void* data); - void* data; - } hsa_executable_iterate_agent_symbols; - struct - { - hsa_executable_t executable; - hsa_status_t (*callback)(hsa_executable_t exec, - hsa_executable_symbol_t symbol, - void* data); - void* data; - } hsa_executable_iterate_program_symbols; - - /* block: AmdExt API */ - struct - { - hsa_agent_t agent; - hsa_amd_coherency_type_t* type; - } hsa_amd_coherency_get_type; - struct - { - hsa_agent_t agent; - hsa_amd_coherency_type_t type; - } hsa_amd_coherency_set_type; - struct - { - hsa_queue_t* queue; - int enable; - } hsa_amd_profiling_set_profiler_enabled; - struct - { - bool enable; - } hsa_amd_profiling_async_copy_enable; - struct - { - hsa_agent_t agent; - hsa_signal_t signal; - hsa_amd_profiling_dispatch_time_t* time; - } hsa_amd_profiling_get_dispatch_time; - struct - { - hsa_signal_t signal; - hsa_amd_profiling_async_copy_time_t* time; - } hsa_amd_profiling_get_async_copy_time; - struct - { - hsa_agent_t agent; - uint64_t agent_tick; - uint64_t* system_tick; - } hsa_amd_profiling_convert_tick_to_system_domain; - struct - { - hsa_signal_t signal; - hsa_signal_condition_t cond; - hsa_signal_value_t value; - hsa_amd_signal_handler handler; - void* arg; - } hsa_amd_signal_async_handler; - struct - { - void (*callback)(void* arg); - void* arg; - } hsa_amd_async_function; - struct - { - uint32_t signal_count; - hsa_signal_t* signals; - hsa_signal_condition_t* conds; - hsa_signal_value_t* values; - uint64_t timeout_hint; - hsa_wait_state_t wait_hint; - hsa_signal_value_t* satisfying_value; - } hsa_amd_signal_wait_any; - struct - { - const hsa_queue_t* queue; - uint32_t num_cu_mask_count; - const uint32_t* cu_mask; - } hsa_amd_queue_cu_set_mask; - struct - { - hsa_amd_memory_pool_t memory_pool; - hsa_amd_memory_pool_info_t attribute; - void* value; - } hsa_amd_memory_pool_get_info; - struct - { - hsa_agent_t agent; - hsa_status_t (*callback)(hsa_amd_memory_pool_t memory_pool, void* data); - void* data; - } hsa_amd_agent_iterate_memory_pools; - struct - { - hsa_amd_memory_pool_t memory_pool; - size_t size; - uint32_t flags; - void** ptr; - } hsa_amd_memory_pool_allocate; - struct - { - void* ptr; - } hsa_amd_memory_pool_free; - struct - { - void* dst; - hsa_agent_t dst_agent; - const void* src; - hsa_agent_t src_agent; - size_t size; - uint32_t num_dep_signals; - const hsa_signal_t* dep_signals; - hsa_signal_t completion_signal; - } hsa_amd_memory_async_copy; - struct - { - void* dst; - hsa_agent_t dst_agent; - const void* src; - hsa_agent_t src_agent; - size_t size; - uint32_t num_dep_signals; - const hsa_signal_t* dep_signals; - hsa_signal_t completion_signal; - hsa_amd_sdma_engine_id_t engine_id; - bool force_copy_on_sdma; - } hsa_amd_memory_async_copy_on_engine; - struct - { - hsa_agent_t dst_agent; - hsa_agent_t src_agent; - uint32_t* engine_ids_mask; - } hsa_amd_memory_copy_engine_status; - struct - { - hsa_agent_t agent; - hsa_amd_memory_pool_t memory_pool; - hsa_amd_agent_memory_pool_info_t attribute; - void* value; - } hsa_amd_agent_memory_pool_get_info; - struct - { - uint32_t num_agents; - const hsa_agent_t* agents; - const uint32_t* flags; - const void* ptr; - } hsa_amd_agents_allow_access; - struct - { - hsa_amd_memory_pool_t src_memory_pool; - hsa_amd_memory_pool_t dst_memory_pool; - bool* result; - } hsa_amd_memory_pool_can_migrate; - struct - { - const void* ptr; - hsa_amd_memory_pool_t memory_pool; - uint32_t flags; - } hsa_amd_memory_migrate; - struct - { - void* host_ptr; - size_t size; - hsa_agent_t* agents; - int num_agent; - void** agent_ptr; - } hsa_amd_memory_lock; - struct - { - void* host_ptr; - } hsa_amd_memory_unlock; - struct - { - void* ptr; - uint32_t value; - size_t count; - } hsa_amd_memory_fill; - struct - { - uint32_t num_agents; - hsa_agent_t* agents; - int interop_handle; - uint32_t flags; - size_t* size; - void** ptr; - size_t* metadata_size; - const void** metadata; - } hsa_amd_interop_map_buffer; - struct - { - void* ptr; - } hsa_amd_interop_unmap_buffer; - struct - { - hsa_agent_t agent; - const hsa_ext_image_descriptor_t* image_descriptor; - const hsa_amd_image_descriptor_t* image_layout; - const void* image_data; - hsa_access_permission_t access_permission; - hsa_ext_image_t* image; - } hsa_amd_image_create; - struct - { - const void* ptr; - hsa_amd_pointer_info_t* info; - void* (*alloc)(size_t); - uint32_t* num_agents_accessible; - hsa_agent_t** accessible; - } hsa_amd_pointer_info; - struct - { - const void* ptr; - void* userdata; - } hsa_amd_pointer_info_set_userdata; - struct - { - void* ptr; - size_t len; - hsa_amd_ipc_memory_t* handle; - } hsa_amd_ipc_memory_create; - struct - { - const hsa_amd_ipc_memory_t* handle; - size_t len; - uint32_t num_agents; - const hsa_agent_t* mapping_agents; - void** mapped_ptr; - } hsa_amd_ipc_memory_attach; - struct - { - void* mapped_ptr; - } hsa_amd_ipc_memory_detach; - struct - { - hsa_signal_value_t initial_value; - uint32_t num_consumers; - const hsa_agent_t* consumers; - uint64_t attributes; - hsa_signal_t* signal; - } hsa_amd_signal_create; - struct - { - hsa_signal_t signal; - hsa_amd_ipc_signal_t* handle; - } hsa_amd_ipc_signal_create; - struct - { - const hsa_amd_ipc_signal_t* handle; - hsa_signal_t* signal; - } hsa_amd_ipc_signal_attach; - struct - { - hsa_amd_system_event_callback_t callback; - void* data; - } hsa_amd_register_system_event_handler; - struct - { - hsa_agent_t agent_handle; - uint32_t size; - hsa_queue_type32_t type; - void (*callback)(hsa_status_t status, hsa_queue_t* source, void* data); - void* data; - uint32_t private_segment_size; - uint32_t group_segment_size; - hsa_queue_t** queue; - } hsa_amd_queue_intercept_create; - struct - { - hsa_queue_t* queue; - hsa_amd_queue_intercept_handler callback; - void* user_data; - } hsa_amd_queue_intercept_register; - struct - { - hsa_queue_t* queue; - hsa_amd_queue_priority_t priority; - } hsa_amd_queue_set_priority; - struct - { - const hsa_pitched_ptr_t* dst; - const hsa_dim3_t* dst_offset; - const hsa_pitched_ptr_t* src; - const hsa_dim3_t* src_offset; - const hsa_dim3_t* range; - hsa_dim3_t range__val; - hsa_agent_t copy_agent; - hsa_amd_copy_direction_t dir; - uint32_t num_dep_signals; - const hsa_signal_t* dep_signals; - hsa_signal_t completion_signal; - } hsa_amd_memory_async_copy_rect; - struct - { - hsa_amd_runtime_queue_notifier callback; - void* user_data; - } hsa_amd_runtime_queue_create_register; - struct - { - void* host_ptr; - size_t size; - hsa_agent_t* agents; - int num_agent; - hsa_amd_memory_pool_t pool; - uint32_t flags; - void** agent_ptr; - } hsa_amd_memory_lock_to_pool; - struct - { - void* ptr; - hsa_amd_deallocation_callback_t callback; - void* user_data; - } hsa_amd_register_deallocation_callback; - struct - { - void* ptr; - hsa_amd_deallocation_callback_t callback; - } hsa_amd_deregister_deallocation_callback; - struct - { - hsa_signal_t signal; - volatile hsa_signal_value_t** value_ptr; - } hsa_amd_signal_value_pointer; - struct - { - void* ptr; - size_t size; - hsa_amd_svm_attribute_pair_t* attribute_list; - size_t attribute_count; - } hsa_amd_svm_attributes_set; - struct - { - void* ptr; - size_t size; - hsa_amd_svm_attribute_pair_t* attribute_list; - size_t attribute_count; - } hsa_amd_svm_attributes_get; - struct - { - void* ptr; - size_t size; - hsa_agent_t agent; - uint32_t num_dep_signals; - const hsa_signal_t* dep_signals; - hsa_signal_t completion_signal; - } hsa_amd_svm_prefetch_async; - struct - { - hsa_agent_t preferred_agent; - } hsa_amd_spm_acquire; - struct - { - hsa_agent_t preferred_agent; - } hsa_amd_spm_release; - struct - { - hsa_agent_t preferred_agent; - size_t size_in_bytes; - uint32_t* timeout; - uint32_t* size_copied; - void* dest; - bool* is_data_loss; - } hsa_amd_spm_set_dest_buffer; - struct - { - const hsa_queue_t* queue; - uint32_t num_cu_mask_count; - uint32_t* cu_mask; - } hsa_amd_queue_cu_get_mask; - struct - { - const void* ptr; - size_t size; - int* dmabuf; - uint64_t* offset; - } hsa_amd_portable_export_dmabuf; - struct - { - int dmabuf; - } hsa_amd_portable_close_dmabuf; - - /* block: ImageExt API */ - struct - { - hsa_agent_t agent; - hsa_ext_image_geometry_t geometry; - const hsa_ext_image_format_t* image_format; - uint32_t* capability_mask; - } hsa_ext_image_get_capability; - struct - { - hsa_agent_t agent; - const hsa_ext_image_descriptor_t* image_descriptor; - hsa_access_permission_t access_permission; - hsa_ext_image_data_info_t* image_data_info; - } hsa_ext_image_data_get_info; - struct - { - hsa_agent_t agent; - const hsa_ext_image_descriptor_t* image_descriptor; - const void* image_data; - hsa_access_permission_t access_permission; - hsa_ext_image_t* image; - } hsa_ext_image_create; - struct - { - hsa_agent_t agent; - const void* src_memory; - size_t src_row_pitch; - size_t src_slice_pitch; - hsa_ext_image_t dst_image; - const hsa_ext_image_region_t* image_region; - } hsa_ext_image_import; - struct - { - hsa_agent_t agent; - hsa_ext_image_t src_image; - void* dst_memory; - size_t dst_row_pitch; - size_t dst_slice_pitch; - const hsa_ext_image_region_t* image_region; - } hsa_ext_image_export; - struct - { - hsa_agent_t agent; - hsa_ext_image_t src_image; - const hsa_dim3_t* src_offset; - hsa_ext_image_t dst_image; - const hsa_dim3_t* dst_offset; - const hsa_dim3_t* range; - } hsa_ext_image_copy; - struct - { - hsa_agent_t agent; - hsa_ext_image_t image; - const void* data; - const hsa_ext_image_region_t* image_region; - } hsa_ext_image_clear; - struct - { - hsa_agent_t agent; - hsa_ext_image_t image; - } hsa_ext_image_destroy; - struct - { - hsa_agent_t agent; - const hsa_ext_sampler_descriptor_t* sampler_descriptor; - hsa_ext_sampler_t* sampler; - } hsa_ext_sampler_create; - struct - { - hsa_agent_t agent; - hsa_ext_sampler_t sampler; - } hsa_ext_sampler_destroy; - struct - { - hsa_agent_t agent; - hsa_ext_image_geometry_t geometry; - const hsa_ext_image_format_t* image_format; - hsa_ext_image_data_layout_t image_data_layout; - uint32_t* capability_mask; - } hsa_ext_image_get_capability_with_layout; - struct - { - hsa_agent_t agent; - const hsa_ext_image_descriptor_t* image_descriptor; - hsa_access_permission_t access_permission; - hsa_ext_image_data_layout_t image_data_layout; - size_t image_data_row_pitch; - size_t image_data_slice_pitch; - hsa_ext_image_data_info_t* image_data_info; - } hsa_ext_image_data_get_info_with_layout; - struct - { - hsa_agent_t agent; - const hsa_ext_image_descriptor_t* image_descriptor; - const void* image_data; - hsa_access_permission_t access_permission; - hsa_ext_image_data_layout_t image_data_layout; - size_t image_data_row_pitch; - size_t image_data_slice_pitch; - hsa_ext_image_t* image; - } hsa_ext_image_create_with_layout; - } args; - uint64_t* phase_data; -} hsa_api_data_t; - -// HIP API callbacks data structures -typedef struct hip_api_data_s -{ - uint64_t correlation_id; - uint32_t phase; - union - { - struct - { - dim3* gridDim; - dim3 gridDim__val; - dim3* blockDim; - dim3 blockDim__val; - size_t* sharedMem; - size_t sharedMem__val; - hipStream_t* stream; - hipStream_t stream__val; - } __hipPopCallConfiguration; - struct - { - dim3 gridDim; - dim3 blockDim; - size_t sharedMem; - hipStream_t stream; - } __hipPushCallConfiguration; - struct - { - hipArray** array; - hipArray* array__val; - const HIP_ARRAY3D_DESCRIPTOR* pAllocateArray; - HIP_ARRAY3D_DESCRIPTOR pAllocateArray__val; - } hipArray3DCreate; - struct - { - HIP_ARRAY3D_DESCRIPTOR* pArrayDescriptor; - HIP_ARRAY3D_DESCRIPTOR pArrayDescriptor__val; - hipArray* array; - hipArray array__val; - } hipArray3DGetDescriptor; - struct - { - hipArray** pHandle; - hipArray* pHandle__val; - const HIP_ARRAY_DESCRIPTOR* pAllocateArray; - HIP_ARRAY_DESCRIPTOR pAllocateArray__val; - } hipArrayCreate; - struct - { - hipArray* array; - hipArray array__val; - } hipArrayDestroy; - struct - { - HIP_ARRAY_DESCRIPTOR* pArrayDescriptor; - HIP_ARRAY_DESCRIPTOR pArrayDescriptor__val; - hipArray* array; - hipArray array__val; - } hipArrayGetDescriptor; - struct - { - hipChannelFormatDesc* desc; - hipChannelFormatDesc desc__val; - hipExtent* extent; - hipExtent extent__val; - unsigned int* flags; - unsigned int flags__val; - hipArray* array; - hipArray array__val; - } hipArrayGetInfo; - struct - { - int* device; - int device__val; - const hipDeviceProp_t* prop; - hipDeviceProp_t prop__val; - } hipChooseDevice; - struct - { - dim3 gridDim; - dim3 blockDim; - size_t sharedMem; - hipStream_t stream; - } hipConfigureCall; - struct - { - hipSurfaceObject_t* pSurfObject; - hipSurfaceObject_t pSurfObject__val; - const hipResourceDesc* pResDesc; - hipResourceDesc pResDesc__val; - } hipCreateSurfaceObject; - struct - { - hipCtx_t* ctx; - hipCtx_t ctx__val; - unsigned int flags; - hipDevice_t device; - } hipCtxCreate; - struct - { - hipCtx_t ctx; - } hipCtxDestroy; - struct - { - hipCtx_t peerCtx; - } hipCtxDisablePeerAccess; - struct - { - hipCtx_t peerCtx; - unsigned int flags; - } hipCtxEnablePeerAccess; - struct - { - hipCtx_t ctx; - int* apiVersion; - int apiVersion__val; - } hipCtxGetApiVersion; - struct - { - hipFuncCache_t* cacheConfig; - hipFuncCache_t cacheConfig__val; - } hipCtxGetCacheConfig; - struct - { - hipCtx_t* ctx; - hipCtx_t ctx__val; - } hipCtxGetCurrent; - struct - { - hipDevice_t* device; - hipDevice_t device__val; - } hipCtxGetDevice; - struct - { - unsigned int* flags; - unsigned int flags__val; - } hipCtxGetFlags; - struct - { - hipSharedMemConfig* pConfig; - hipSharedMemConfig pConfig__val; - } hipCtxGetSharedMemConfig; - struct - { - hipCtx_t* ctx; - hipCtx_t ctx__val; - } hipCtxPopCurrent; - struct - { - hipCtx_t ctx; - } hipCtxPushCurrent; - struct - { - hipFuncCache_t cacheConfig; - } hipCtxSetCacheConfig; - struct - { - hipCtx_t ctx; - } hipCtxSetCurrent; - struct - { - hipSharedMemConfig config; - } hipCtxSetSharedMemConfig; - struct - { - hipExternalMemory_t extMem; - } hipDestroyExternalMemory; - struct - { - hipExternalSemaphore_t extSem; - } hipDestroyExternalSemaphore; - struct - { - hipSurfaceObject_t surfaceObject; - } hipDestroySurfaceObject; - struct - { - int* canAccessPeer; - int canAccessPeer__val; - int deviceId; - int peerDeviceId; - } hipDeviceCanAccessPeer; - struct - { - int* major; - int major__val; - int* minor; - int minor__val; - hipDevice_t device; - } hipDeviceComputeCapability; - struct - { - int peerDeviceId; - } hipDeviceDisablePeerAccess; - struct - { - int peerDeviceId; - unsigned int flags; - } hipDeviceEnablePeerAccess; - struct - { - hipDevice_t* device; - hipDevice_t device__val; - int ordinal; - } hipDeviceGet; - struct - { - int* pi; - int pi__val; - hipDeviceAttribute_t attr; - int deviceId; - } hipDeviceGetAttribute; - struct - { - int* device; - int device__val; - const char* pciBusId; - char pciBusId__val; - } hipDeviceGetByPCIBusId; - struct - { - hipFuncCache_t* cacheConfig; - hipFuncCache_t cacheConfig__val; - } hipDeviceGetCacheConfig; - struct - { - hipMemPool_t* mem_pool; - hipMemPool_t mem_pool__val; - int device; - } hipDeviceGetDefaultMemPool; - struct - { - int device; - hipGraphMemAttributeType attr; - void* value; - } hipDeviceGetGraphMemAttribute; - struct - { - size_t* pValue; - size_t pValue__val; - enum hipLimit_t limit; - } hipDeviceGetLimit; - struct - { - hipMemPool_t* mem_pool; - hipMemPool_t mem_pool__val; - int device; - } hipDeviceGetMemPool; - struct - { - char* name; - char name__val; - int len; - hipDevice_t device; - } hipDeviceGetName; - struct - { - int* value; - int value__val; - hipDeviceP2PAttr attr; - int srcDevice; - int dstDevice; - } hipDeviceGetP2PAttribute; - struct - { - char* pciBusId; - char pciBusId__val; - int len; - int device; - } hipDeviceGetPCIBusId; - struct - { - hipSharedMemConfig* pConfig; - hipSharedMemConfig pConfig__val; - } hipDeviceGetSharedMemConfig; - struct - { - int* leastPriority; - int leastPriority__val; - int* greatestPriority; - int greatestPriority__val; - } hipDeviceGetStreamPriorityRange; - struct - { - hipUUID* uuid; - hipUUID uuid__val; - hipDevice_t device; - } hipDeviceGetUuid; - struct - { - int device; - } hipDeviceGraphMemTrim; - struct - { - hipDevice_t dev; - unsigned int* flags; - unsigned int flags__val; - int* active; - int active__val; - } hipDevicePrimaryCtxGetState; - struct - { - hipDevice_t dev; - } hipDevicePrimaryCtxRelease; - struct - { - hipDevice_t dev; - } hipDevicePrimaryCtxReset; - struct - { - hipCtx_t* pctx; - hipCtx_t pctx__val; - hipDevice_t dev; - } hipDevicePrimaryCtxRetain; - struct - { - hipDevice_t dev; - unsigned int flags; - } hipDevicePrimaryCtxSetFlags; - struct - { - hipFuncCache_t cacheConfig; - } hipDeviceSetCacheConfig; - struct - { - int device; - hipGraphMemAttributeType attr; - void* value; - } hipDeviceSetGraphMemAttribute; - struct - { - enum hipLimit_t limit; - size_t value; - } hipDeviceSetLimit; - struct - { - int device; - hipMemPool_t mem_pool; - } hipDeviceSetMemPool; - struct - { - hipSharedMemConfig config; - } hipDeviceSetSharedMemConfig; - struct - { - size_t* bytes; - size_t bytes__val; - hipDevice_t device; - } hipDeviceTotalMem; - struct - { - int* driverVersion; - int driverVersion__val; - } hipDriverGetVersion; - struct - { - const hip_Memcpy2D* pCopy; - hip_Memcpy2D pCopy__val; - } hipDrvMemcpy2DUnaligned; - struct - { - const HIP_MEMCPY3D* pCopy; - HIP_MEMCPY3D pCopy__val; - } hipDrvMemcpy3D; - struct - { - const HIP_MEMCPY3D* pCopy; - HIP_MEMCPY3D pCopy__val; - hipStream_t stream; - } hipDrvMemcpy3DAsync; - struct - { - unsigned int numAttributes; - hipPointer_attribute* attributes; - hipPointer_attribute attributes__val; - void** data; - void* data__val; - hipDeviceptr_t ptr; - } hipDrvPointerGetAttributes; - struct - { - hipEvent_t* event; - hipEvent_t event__val; - } hipEventCreate; - struct - { - hipEvent_t* event; - hipEvent_t event__val; - unsigned int flags; - } hipEventCreateWithFlags; - struct - { - hipEvent_t event; - } hipEventDestroy; - struct - { - float* ms; - float ms__val; - hipEvent_t start; - hipEvent_t stop; - } hipEventElapsedTime; - struct - { - hipEvent_t event; - } hipEventQuery; - struct - { - hipEvent_t event; - hipStream_t stream; - } hipEventRecord; - struct - { - hipEvent_t event; - } hipEventSynchronize; - struct - { - int device1; - int device2; - unsigned int* linktype; - unsigned int linktype__val; - unsigned int* hopcount; - unsigned int hopcount__val; - } hipExtGetLinkTypeAndHopCount; - struct - { - const void* function_address; - dim3 numBlocks; - dim3 dimBlocks; - void** args; - void* args__val; - size_t sharedMemBytes; - hipStream_t stream; - hipEvent_t startEvent; - hipEvent_t stopEvent; - int flags; - } hipExtLaunchKernel; - struct - { - hipLaunchParams* launchParamsList; - hipLaunchParams launchParamsList__val; - int numDevices; - unsigned int flags; - } hipExtLaunchMultiKernelMultiDevice; - struct - { - void** ptr; - void* ptr__val; - size_t sizeBytes; - unsigned int flags; - } hipExtMallocWithFlags; - struct - { - hipFunction_t f; - unsigned int globalWorkSizeX; - unsigned int globalWorkSizeY; - unsigned int globalWorkSizeZ; - unsigned int localWorkSizeX; - unsigned int localWorkSizeY; - unsigned int localWorkSizeZ; - size_t sharedMemBytes; - hipStream_t hStream; - void** kernelParams; - void* kernelParams__val; - void** extra; - void* extra__val; - hipEvent_t startEvent; - hipEvent_t stopEvent; - unsigned int flags; - } hipExtModuleLaunchKernel; - struct - { - hipStream_t* stream; - hipStream_t stream__val; - unsigned int cuMaskSize; - const unsigned int* cuMask; - unsigned int cuMask__val; - } hipExtStreamCreateWithCUMask; - struct - { - hipStream_t stream; - unsigned int cuMaskSize; - unsigned int* cuMask; - unsigned int cuMask__val; - } hipExtStreamGetCUMask; - struct - { - void** devPtr; - void* devPtr__val; - hipExternalMemory_t extMem; - const hipExternalMemoryBufferDesc* bufferDesc; - hipExternalMemoryBufferDesc bufferDesc__val; - } hipExternalMemoryGetMappedBuffer; - struct - { - void* ptr; - } hipFree; - struct - { - hipArray* array; - hipArray array__val; - } hipFreeArray; - struct - { - void* dev_ptr; - hipStream_t stream; - } hipFreeAsync; - struct - { - void* ptr; - } hipFreeHost; - struct - { - hipMipmappedArray_t mipmappedArray; - } hipFreeMipmappedArray; - struct - { - int* value; - int value__val; - hipFunction_attribute attrib; - hipFunction_t hfunc; - } hipFuncGetAttribute; - struct - { - hipFuncAttributes* attr; - hipFuncAttributes attr__val; - const void* func; - } hipFuncGetAttributes; - struct - { - const void* func; - hipFuncAttribute attr; - int value; - } hipFuncSetAttribute; - struct - { - const void* func; - hipFuncCache_t config; - } hipFuncSetCacheConfig; - struct - { - const void* func; - hipSharedMemConfig config; - } hipFuncSetSharedMemConfig; - struct - { - unsigned int* pHipDeviceCount; - unsigned int pHipDeviceCount__val; - int* pHipDevices; - int pHipDevices__val; - unsigned int hipDeviceCount; - hipGLDeviceList deviceList; - } hipGLGetDevices; - struct - { - hipChannelFormatDesc* desc; - hipChannelFormatDesc desc__val; - hipArray_const_t array; - } hipGetChannelDesc; - struct - { - int* deviceId; - int deviceId__val; - } hipGetDevice; - struct - { - int* count; - int count__val; - } hipGetDeviceCount; - struct - { - unsigned int* flags; - unsigned int flags__val; - } hipGetDeviceFlags; - struct - { - hipDeviceProp_t* props; - hipDeviceProp_t props__val; - hipDevice_t device; - } hipGetDeviceProperties; - struct - { - hipArray_t* levelArray; - hipArray_t levelArray__val; - hipMipmappedArray_const_t mipmappedArray; - unsigned int level; - } hipGetMipmappedArrayLevel; - struct - { - void** devPtr; - void* devPtr__val; - const void* symbol; - } hipGetSymbolAddress; - struct - { - size_t* size; - size_t size__val; - const void* symbol; - } hipGetSymbolSize; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - hipGraph_t childGraph; - } hipGraphAddChildGraphNode; - struct - { - hipGraph_t graph; - const hipGraphNode_t* from; - hipGraphNode_t from__val; - const hipGraphNode_t* to; - hipGraphNode_t to__val; - size_t numDependencies; - } hipGraphAddDependencies; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - } hipGraphAddEmptyNode; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - hipEvent_t event; - } hipGraphAddEventRecordNode; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - hipEvent_t event; - } hipGraphAddEventWaitNode; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - const hipHostNodeParams* pNodeParams; - hipHostNodeParams pNodeParams__val; - } hipGraphAddHostNode; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - const hipKernelNodeParams* pNodeParams; - hipKernelNodeParams pNodeParams__val; - } hipGraphAddKernelNode; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - hipMemAllocNodeParams* pNodeParams; - hipMemAllocNodeParams pNodeParams__val; - } hipGraphAddMemAllocNode; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - void* dev_ptr; - } hipGraphAddMemFreeNode; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - const hipMemcpy3DParms* pCopyParams; - hipMemcpy3DParms pCopyParams__val; - } hipGraphAddMemcpyNode; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - void* dst; - const void* src; - size_t count; - hipMemcpyKind kind; - } hipGraphAddMemcpyNode1D; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - void* dst; - const void* symbol; - size_t count; - size_t offset; - hipMemcpyKind kind; - } hipGraphAddMemcpyNodeFromSymbol; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - const void* symbol; - const void* src; - size_t count; - size_t offset; - hipMemcpyKind kind; - } hipGraphAddMemcpyNodeToSymbol; - struct - { - hipGraphNode_t* pGraphNode; - hipGraphNode_t pGraphNode__val; - hipGraph_t graph; - const hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t numDependencies; - const hipMemsetParams* pMemsetParams; - hipMemsetParams pMemsetParams__val; - } hipGraphAddMemsetNode; - struct - { - hipGraphNode_t node; - hipGraph_t* pGraph; - hipGraph_t pGraph__val; - } hipGraphChildGraphNodeGetGraph; - struct - { - hipGraph_t* pGraphClone; - hipGraph_t pGraphClone__val; - hipGraph_t originalGraph; - } hipGraphClone; - struct - { - hipGraph_t* pGraph; - hipGraph_t pGraph__val; - unsigned int flags; - } hipGraphCreate; - struct - { - hipGraph_t graph; - const char* path; - char path__val; - unsigned int flags; - } hipGraphDebugDotPrint; - struct - { - hipGraph_t graph; - } hipGraphDestroy; - struct - { - hipGraphNode_t node; - } hipGraphDestroyNode; - struct - { - hipGraphNode_t node; - hipEvent_t* event_out; - hipEvent_t event_out__val; - } hipGraphEventRecordNodeGetEvent; - struct - { - hipGraphNode_t node; - hipEvent_t event; - } hipGraphEventRecordNodeSetEvent; - struct - { - hipGraphNode_t node; - hipEvent_t* event_out; - hipEvent_t event_out__val; - } hipGraphEventWaitNodeGetEvent; - struct - { - hipGraphNode_t node; - hipEvent_t event; - } hipGraphEventWaitNodeSetEvent; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t node; - hipGraph_t childGraph; - } hipGraphExecChildGraphNodeSetParams; - struct - { - hipGraphExec_t graphExec; - } hipGraphExecDestroy; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t hNode; - hipEvent_t event; - } hipGraphExecEventRecordNodeSetEvent; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t hNode; - hipEvent_t event; - } hipGraphExecEventWaitNodeSetEvent; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t node; - const hipHostNodeParams* pNodeParams; - hipHostNodeParams pNodeParams__val; - } hipGraphExecHostNodeSetParams; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t node; - const hipKernelNodeParams* pNodeParams; - hipKernelNodeParams pNodeParams__val; - } hipGraphExecKernelNodeSetParams; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t node; - hipMemcpy3DParms* pNodeParams; - hipMemcpy3DParms pNodeParams__val; - } hipGraphExecMemcpyNodeSetParams; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t node; - void* dst; - const void* src; - size_t count; - hipMemcpyKind kind; - } hipGraphExecMemcpyNodeSetParams1D; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t node; - void* dst; - const void* symbol; - size_t count; - size_t offset; - hipMemcpyKind kind; - } hipGraphExecMemcpyNodeSetParamsFromSymbol; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t node; - const void* symbol; - const void* src; - size_t count; - size_t offset; - hipMemcpyKind kind; - } hipGraphExecMemcpyNodeSetParamsToSymbol; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t node; - const hipMemsetParams* pNodeParams; - hipMemsetParams pNodeParams__val; - } hipGraphExecMemsetNodeSetParams; - struct - { - hipGraphExec_t hGraphExec; - hipGraph_t hGraph; - hipGraphNode_t* hErrorNode_out; - hipGraphNode_t hErrorNode_out__val; - hipGraphExecUpdateResult* updateResult_out; - hipGraphExecUpdateResult updateResult_out__val; - } hipGraphExecUpdate; - struct - { - hipGraph_t graph; - hipGraphNode_t* from; - hipGraphNode_t from__val; - hipGraphNode_t* to; - hipGraphNode_t to__val; - size_t* numEdges; - size_t numEdges__val; - } hipGraphGetEdges; - struct - { - hipGraph_t graph; - hipGraphNode_t* nodes; - hipGraphNode_t nodes__val; - size_t* numNodes; - size_t numNodes__val; - } hipGraphGetNodes; - struct - { - hipGraph_t graph; - hipGraphNode_t* pRootNodes; - hipGraphNode_t pRootNodes__val; - size_t* pNumRootNodes; - size_t pNumRootNodes__val; - } hipGraphGetRootNodes; - struct - { - hipGraphNode_t node; - hipHostNodeParams* pNodeParams; - hipHostNodeParams pNodeParams__val; - } hipGraphHostNodeGetParams; - struct - { - hipGraphNode_t node; - const hipHostNodeParams* pNodeParams; - hipHostNodeParams pNodeParams__val; - } hipGraphHostNodeSetParams; - struct - { - hipGraphExec_t* pGraphExec; - hipGraphExec_t pGraphExec__val; - hipGraph_t graph; - hipGraphNode_t* pErrorNode; - hipGraphNode_t pErrorNode__val; - char* pLogBuffer; - char pLogBuffer__val; - size_t bufferSize; - } hipGraphInstantiate; - struct - { - hipGraphExec_t* pGraphExec; - hipGraphExec_t pGraphExec__val; - hipGraph_t graph; - unsigned long long flags; - } hipGraphInstantiateWithFlags; - struct - { - hipGraphNode_t hSrc; - hipGraphNode_t hDst; - } hipGraphKernelNodeCopyAttributes; - struct - { - hipGraphNode_t hNode; - hipKernelNodeAttrID attr; - hipKernelNodeAttrValue* value; - hipKernelNodeAttrValue value__val; - } hipGraphKernelNodeGetAttribute; - struct - { - hipGraphNode_t node; - hipKernelNodeParams* pNodeParams; - hipKernelNodeParams pNodeParams__val; - } hipGraphKernelNodeGetParams; - struct - { - hipGraphNode_t hNode; - hipKernelNodeAttrID attr; - const hipKernelNodeAttrValue* value; - hipKernelNodeAttrValue value__val; - } hipGraphKernelNodeSetAttribute; - struct - { - hipGraphNode_t node; - const hipKernelNodeParams* pNodeParams; - hipKernelNodeParams pNodeParams__val; - } hipGraphKernelNodeSetParams; - struct - { - hipGraphExec_t graphExec; - hipStream_t stream; - } hipGraphLaunch; - struct - { - hipGraphNode_t node; - hipMemAllocNodeParams* pNodeParams; - hipMemAllocNodeParams pNodeParams__val; - } hipGraphMemAllocNodeGetParams; - struct - { - hipGraphNode_t node; - void* dev_ptr; - } hipGraphMemFreeNodeGetParams; - struct - { - hipGraphNode_t node; - hipMemcpy3DParms* pNodeParams; - hipMemcpy3DParms pNodeParams__val; - } hipGraphMemcpyNodeGetParams; - struct - { - hipGraphNode_t node; - const hipMemcpy3DParms* pNodeParams; - hipMemcpy3DParms pNodeParams__val; - } hipGraphMemcpyNodeSetParams; - struct - { - hipGraphNode_t node; - void* dst; - const void* src; - size_t count; - hipMemcpyKind kind; - } hipGraphMemcpyNodeSetParams1D; - struct - { - hipGraphNode_t node; - void* dst; - const void* symbol; - size_t count; - size_t offset; - hipMemcpyKind kind; - } hipGraphMemcpyNodeSetParamsFromSymbol; - struct - { - hipGraphNode_t node; - const void* symbol; - const void* src; - size_t count; - size_t offset; - hipMemcpyKind kind; - } hipGraphMemcpyNodeSetParamsToSymbol; - struct - { - hipGraphNode_t node; - hipMemsetParams* pNodeParams; - hipMemsetParams pNodeParams__val; - } hipGraphMemsetNodeGetParams; - struct - { - hipGraphNode_t node; - const hipMemsetParams* pNodeParams; - hipMemsetParams pNodeParams__val; - } hipGraphMemsetNodeSetParams; - struct - { - hipGraphNode_t* pNode; - hipGraphNode_t pNode__val; - hipGraphNode_t originalNode; - hipGraph_t clonedGraph; - } hipGraphNodeFindInClone; - struct - { - hipGraphNode_t node; - hipGraphNode_t* pDependencies; - hipGraphNode_t pDependencies__val; - size_t* pNumDependencies; - size_t pNumDependencies__val; - } hipGraphNodeGetDependencies; - struct - { - hipGraphNode_t node; - hipGraphNode_t* pDependentNodes; - hipGraphNode_t pDependentNodes__val; - size_t* pNumDependentNodes; - size_t pNumDependentNodes__val; - } hipGraphNodeGetDependentNodes; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t hNode; - unsigned int* isEnabled; - unsigned int isEnabled__val; - } hipGraphNodeGetEnabled; - struct - { - hipGraphNode_t node; - hipGraphNodeType* pType; - hipGraphNodeType pType__val; - } hipGraphNodeGetType; - struct - { - hipGraphExec_t hGraphExec; - hipGraphNode_t hNode; - unsigned int isEnabled; - } hipGraphNodeSetEnabled; - struct - { - hipGraph_t graph; - hipUserObject_t object; - unsigned int count; - } hipGraphReleaseUserObject; - struct - { - hipGraph_t graph; - const hipGraphNode_t* from; - hipGraphNode_t from__val; - const hipGraphNode_t* to; - hipGraphNode_t to__val; - size_t numDependencies; - } hipGraphRemoveDependencies; - struct - { - hipGraph_t graph; - hipUserObject_t object; - unsigned int count; - unsigned int flags; - } hipGraphRetainUserObject; - struct - { - hipGraphExec_t graphExec; - hipStream_t stream; - } hipGraphUpload; - struct - { - hipGraphicsResource** resource; - hipGraphicsResource* resource__val; - GLuint buffer; - unsigned int flags; - } hipGraphicsGLRegisterBuffer; - struct - { - hipGraphicsResource** resource; - hipGraphicsResource* resource__val; - GLuint image; - GLenum target; - unsigned int flags; - } hipGraphicsGLRegisterImage; - struct - { - int count; - hipGraphicsResource_t* resources; - hipGraphicsResource_t resources__val; - hipStream_t stream; - } hipGraphicsMapResources; - struct - { - void** devPtr; - void* devPtr__val; - size_t* size; - size_t size__val; - hipGraphicsResource_t resource; - } hipGraphicsResourceGetMappedPointer; - struct - { - hipArray_t* array; - hipArray_t array__val; - hipGraphicsResource_t resource; - unsigned int arrayIndex; - unsigned int mipLevel; - } hipGraphicsSubResourceGetMappedArray; - struct - { - int count; - hipGraphicsResource_t* resources; - hipGraphicsResource_t resources__val; - hipStream_t stream; - } hipGraphicsUnmapResources; - struct - { - hipGraphicsResource_t resource; - } hipGraphicsUnregisterResource; - struct - { - hipFunction_t f; - unsigned int globalWorkSizeX; - unsigned int globalWorkSizeY; - unsigned int globalWorkSizeZ; - unsigned int blockDimX; - unsigned int blockDimY; - unsigned int blockDimZ; - size_t sharedMemBytes; - hipStream_t hStream; - void** kernelParams; - void* kernelParams__val; - void** extra; - void* extra__val; - hipEvent_t startEvent; - hipEvent_t stopEvent; - } hipHccModuleLaunchKernel; - struct - { - void** ptr; - void* ptr__val; - size_t size; - unsigned int flags; - } hipHostAlloc; - struct - { - void* ptr; - } hipHostFree; - struct - { - void** devPtr; - void* devPtr__val; - void* hstPtr; - unsigned int flags; - } hipHostGetDevicePointer; - struct - { - unsigned int* flagsPtr; - unsigned int flagsPtr__val; - void* hostPtr; - } hipHostGetFlags; - struct - { - void** ptr; - void* ptr__val; - size_t size; - unsigned int flags; - } hipHostMalloc; - struct - { - void* hostPtr; - size_t sizeBytes; - unsigned int flags; - } hipHostRegister; - struct - { - void* hostPtr; - } hipHostUnregister; - struct - { - hipExternalMemory_t* extMem_out; - hipExternalMemory_t extMem_out__val; - const hipExternalMemoryHandleDesc* memHandleDesc; - hipExternalMemoryHandleDesc memHandleDesc__val; - } hipImportExternalMemory; - struct - { - hipExternalSemaphore_t* extSem_out; - hipExternalSemaphore_t extSem_out__val; - const hipExternalSemaphoreHandleDesc* semHandleDesc; - hipExternalSemaphoreHandleDesc semHandleDesc__val; - } hipImportExternalSemaphore; - struct - { - unsigned int flags; - } hipInit; - struct - { - void* devPtr; - } hipIpcCloseMemHandle; - struct - { - hipIpcEventHandle_t* handle; - hipIpcEventHandle_t handle__val; - hipEvent_t event; - } hipIpcGetEventHandle; - struct - { - hipIpcMemHandle_t* handle; - hipIpcMemHandle_t handle__val; - void* devPtr; - } hipIpcGetMemHandle; - struct - { - hipEvent_t* event; - hipEvent_t event__val; - hipIpcEventHandle_t handle; - } hipIpcOpenEventHandle; - struct - { - void** devPtr; - void* devPtr__val; - hipIpcMemHandle_t handle; - unsigned int flags; - } hipIpcOpenMemHandle; - struct - { - const void* hostFunction; - } hipLaunchByPtr; - struct - { - const void* f; - dim3 gridDim; - dim3 blockDimX; - void** kernelParams; - void* kernelParams__val; - unsigned int sharedMemBytes; - hipStream_t stream; - } hipLaunchCooperativeKernel; - struct - { - hipLaunchParams* launchParamsList; - hipLaunchParams launchParamsList__val; - int numDevices; - unsigned int flags; - } hipLaunchCooperativeKernelMultiDevice; - struct - { - hipStream_t stream; - hipHostFn_t fn; - void* userData; - } hipLaunchHostFunc; - struct - { - const void* function_address; - dim3 numBlocks; - dim3 dimBlocks; - void** args; - void* args__val; - size_t sharedMemBytes; - hipStream_t stream; - } hipLaunchKernel; - struct - { - void** ptr; - void* ptr__val; - size_t size; - } hipMalloc; - struct - { - hipPitchedPtr* pitchedDevPtr; - hipPitchedPtr pitchedDevPtr__val; - hipExtent extent; - } hipMalloc3D; - struct - { - hipArray_t* array; - hipArray_t array__val; - const hipChannelFormatDesc* desc; - hipChannelFormatDesc desc__val; - hipExtent extent; - unsigned int flags; - } hipMalloc3DArray; - struct - { - hipArray** array; - hipArray* array__val; - const hipChannelFormatDesc* desc; - hipChannelFormatDesc desc__val; - size_t width; - size_t height; - unsigned int flags; - } hipMallocArray; - struct - { - void** dev_ptr; - void* dev_ptr__val; - size_t size; - hipStream_t stream; - } hipMallocAsync; - struct - { - void** dev_ptr; - void* dev_ptr__val; - size_t size; - hipMemPool_t mem_pool; - hipStream_t stream; - } hipMallocFromPoolAsync; - struct - { - void** ptr; - void* ptr__val; - size_t size; - } hipMallocHost; - struct - { - void** dev_ptr; - void* dev_ptr__val; - size_t size; - unsigned int flags; - } hipMallocManaged; - struct - { - hipMipmappedArray_t* mipmappedArray; - hipMipmappedArray_t mipmappedArray__val; - const hipChannelFormatDesc* desc; - hipChannelFormatDesc desc__val; - hipExtent extent; - unsigned int numLevels; - unsigned int flags; - } hipMallocMipmappedArray; - struct - { - void** ptr; - void* ptr__val; - size_t* pitch; - size_t pitch__val; - size_t width; - size_t height; - } hipMallocPitch; - struct - { - void* devPtr; - size_t size; - } hipMemAddressFree; - struct - { - void** ptr; - void* ptr__val; - size_t size; - size_t alignment; - void* addr; - unsigned long long flags; - } hipMemAddressReserve; - struct - { - const void* dev_ptr; - size_t count; - hipMemoryAdvise advice; - int device; - } hipMemAdvise; - struct - { - void** ptr; - void* ptr__val; - size_t size; - } hipMemAllocHost; - struct - { - hipDeviceptr_t* dptr; - hipDeviceptr_t dptr__val; - size_t* pitch; - size_t pitch__val; - size_t widthInBytes; - size_t height; - unsigned int elementSizeBytes; - } hipMemAllocPitch; - struct - { - hipMemGenericAllocationHandle_t* handle; - hipMemGenericAllocationHandle_t handle__val; - size_t size; - const hipMemAllocationProp* prop; - hipMemAllocationProp prop__val; - unsigned long long flags; - } hipMemCreate; - struct - { - void* shareableHandle; - hipMemGenericAllocationHandle_t handle; - hipMemAllocationHandleType handleType; - unsigned long long flags; - } hipMemExportToShareableHandle; - struct - { - unsigned long long* flags; - unsigned long long flags__val; - const hipMemLocation* location; - hipMemLocation location__val; - void* ptr; - } hipMemGetAccess; - struct - { - hipDeviceptr_t* pbase; - hipDeviceptr_t pbase__val; - size_t* psize; - size_t psize__val; - hipDeviceptr_t dptr; - } hipMemGetAddressRange; - struct - { - size_t* granularity; - size_t granularity__val; - const hipMemAllocationProp* prop; - hipMemAllocationProp prop__val; - hipMemAllocationGranularity_flags option; - } hipMemGetAllocationGranularity; - struct - { - hipMemAllocationProp* prop; - hipMemAllocationProp prop__val; - hipMemGenericAllocationHandle_t handle; - } hipMemGetAllocationPropertiesFromHandle; - struct - { - size_t* free; - size_t free__val; - size_t* total; - size_t total__val; - } hipMemGetInfo; - struct - { - hipMemGenericAllocationHandle_t* handle; - hipMemGenericAllocationHandle_t handle__val; - void* osHandle; - hipMemAllocationHandleType shHandleType; - } hipMemImportFromShareableHandle; - struct - { - void* ptr; - size_t size; - size_t offset; - hipMemGenericAllocationHandle_t handle; - unsigned long long flags; - } hipMemMap; - struct - { - hipArrayMapInfo* mapInfoList; - hipArrayMapInfo mapInfoList__val; - unsigned int count; - hipStream_t stream; - } hipMemMapArrayAsync; - struct - { - hipMemPool_t* mem_pool; - hipMemPool_t mem_pool__val; - const hipMemPoolProps* pool_props; - hipMemPoolProps pool_props__val; - } hipMemPoolCreate; - struct - { - hipMemPool_t mem_pool; - } hipMemPoolDestroy; - struct - { - hipMemPoolPtrExportData* export_data; - hipMemPoolPtrExportData export_data__val; - void* dev_ptr; - } hipMemPoolExportPointer; - struct - { - void* shared_handle; - hipMemPool_t mem_pool; - hipMemAllocationHandleType handle_type; - unsigned int flags; - } hipMemPoolExportToShareableHandle; - struct - { - hipMemAccessFlags* flags; - hipMemAccessFlags flags__val; - hipMemPool_t mem_pool; - hipMemLocation* location; - hipMemLocation location__val; - } hipMemPoolGetAccess; - struct - { - hipMemPool_t mem_pool; - hipMemPoolAttr attr; - void* value; - } hipMemPoolGetAttribute; - struct - { - hipMemPool_t* mem_pool; - hipMemPool_t mem_pool__val; - void* shared_handle; - hipMemAllocationHandleType handle_type; - unsigned int flags; - } hipMemPoolImportFromShareableHandle; - struct - { - void** dev_ptr; - void* dev_ptr__val; - hipMemPool_t mem_pool; - hipMemPoolPtrExportData* export_data; - hipMemPoolPtrExportData export_data__val; - } hipMemPoolImportPointer; - struct - { - hipMemPool_t mem_pool; - const hipMemAccessDesc* desc_list; - hipMemAccessDesc desc_list__val; - size_t count; - } hipMemPoolSetAccess; - struct - { - hipMemPool_t mem_pool; - hipMemPoolAttr attr; - void* value; - } hipMemPoolSetAttribute; - struct - { - hipMemPool_t mem_pool; - size_t min_bytes_to_hold; - } hipMemPoolTrimTo; - struct - { - const void* dev_ptr; - size_t count; - int device; - hipStream_t stream; - } hipMemPrefetchAsync; - struct - { - void* ptr; - size_t* size; - size_t size__val; - } hipMemPtrGetInfo; - struct - { - void* data; - size_t data_size; - hipMemRangeAttribute attribute; - const void* dev_ptr; - size_t count; - } hipMemRangeGetAttribute; - struct - { - void** data; - void* data__val; - size_t* data_sizes; - size_t data_sizes__val; - hipMemRangeAttribute* attributes; - hipMemRangeAttribute attributes__val; - size_t num_attributes; - const void* dev_ptr; - size_t count; - } hipMemRangeGetAttributes; - struct - { - hipMemGenericAllocationHandle_t handle; - } hipMemRelease; - struct - { - hipMemGenericAllocationHandle_t* handle; - hipMemGenericAllocationHandle_t handle__val; - void* addr; - } hipMemRetainAllocationHandle; - struct - { - void* ptr; - size_t size; - const hipMemAccessDesc* desc; - hipMemAccessDesc desc__val; - size_t count; - } hipMemSetAccess; - struct - { - void* ptr; - size_t size; - } hipMemUnmap; - struct - { - void* dst; - const void* src; - size_t sizeBytes; - hipMemcpyKind kind; - } hipMemcpy; - struct - { - void* dst; - size_t dpitch; - const void* src; - size_t spitch; - size_t width; - size_t height; - hipMemcpyKind kind; - } hipMemcpy2D; - struct - { - void* dst; - size_t dpitch; - const void* src; - size_t spitch; - size_t width; - size_t height; - hipMemcpyKind kind; - hipStream_t stream; - } hipMemcpy2DAsync; - struct - { - void* dst; - size_t dpitch; - hipArray_const_t src; - size_t wOffset; - size_t hOffset; - size_t width; - size_t height; - hipMemcpyKind kind; - } hipMemcpy2DFromArray; - struct - { - void* dst; - size_t dpitch; - hipArray_const_t src; - size_t wOffset; - size_t hOffset; - size_t width; - size_t height; - hipMemcpyKind kind; - hipStream_t stream; - } hipMemcpy2DFromArrayAsync; - struct - { - hipArray* dst; - hipArray dst__val; - size_t wOffset; - size_t hOffset; - const void* src; - size_t spitch; - size_t width; - size_t height; - hipMemcpyKind kind; - } hipMemcpy2DToArray; - struct - { - hipArray* dst; - hipArray dst__val; - size_t wOffset; - size_t hOffset; - const void* src; - size_t spitch; - size_t width; - size_t height; - hipMemcpyKind kind; - hipStream_t stream; - } hipMemcpy2DToArrayAsync; - struct - { - const hipMemcpy3DParms* p; - hipMemcpy3DParms p__val; - } hipMemcpy3D; - struct - { - const hipMemcpy3DParms* p; - hipMemcpy3DParms p__val; - hipStream_t stream; - } hipMemcpy3DAsync; - struct - { - void* dst; - const void* src; - size_t sizeBytes; - hipMemcpyKind kind; - hipStream_t stream; - } hipMemcpyAsync; - struct - { - void* dst; - hipArray* srcArray; - hipArray srcArray__val; - size_t srcOffset; - size_t count; - } hipMemcpyAtoH; - struct - { - hipDeviceptr_t dst; - hipDeviceptr_t src; - size_t sizeBytes; - } hipMemcpyDtoD; - struct - { - hipDeviceptr_t dst; - hipDeviceptr_t src; - size_t sizeBytes; - hipStream_t stream; - } hipMemcpyDtoDAsync; - struct - { - void* dst; - hipDeviceptr_t src; - size_t sizeBytes; - } hipMemcpyDtoH; - struct - { - void* dst; - hipDeviceptr_t src; - size_t sizeBytes; - hipStream_t stream; - } hipMemcpyDtoHAsync; - struct - { - void* dst; - hipArray_const_t srcArray; - size_t wOffset; - size_t hOffset; - size_t count; - hipMemcpyKind kind; - } hipMemcpyFromArray; - struct - { - void* dst; - const void* symbol; - size_t sizeBytes; - size_t offset; - hipMemcpyKind kind; - } hipMemcpyFromSymbol; - struct - { - void* dst; - const void* symbol; - size_t sizeBytes; - size_t offset; - hipMemcpyKind kind; - hipStream_t stream; - } hipMemcpyFromSymbolAsync; - struct - { - hipArray* dstArray; - hipArray dstArray__val; - size_t dstOffset; - const void* srcHost; - size_t count; - } hipMemcpyHtoA; - struct - { - hipDeviceptr_t dst; - void* src; - size_t sizeBytes; - } hipMemcpyHtoD; - struct - { - hipDeviceptr_t dst; - void* src; - size_t sizeBytes; - hipStream_t stream; - } hipMemcpyHtoDAsync; - struct - { - const hip_Memcpy2D* pCopy; - hip_Memcpy2D pCopy__val; - } hipMemcpyParam2D; - struct - { - const hip_Memcpy2D* pCopy; - hip_Memcpy2D pCopy__val; - hipStream_t stream; - } hipMemcpyParam2DAsync; - struct - { - void* dst; - int dstDeviceId; - const void* src; - int srcDeviceId; - size_t sizeBytes; - } hipMemcpyPeer; - struct - { - void* dst; - int dstDeviceId; - const void* src; - int srcDevice; - size_t sizeBytes; - hipStream_t stream; - } hipMemcpyPeerAsync; - struct - { - hipArray* dst; - hipArray dst__val; - size_t wOffset; - size_t hOffset; - const void* src; - size_t count; - hipMemcpyKind kind; - } hipMemcpyToArray; - struct - { - const void* symbol; - const void* src; - size_t sizeBytes; - size_t offset; - hipMemcpyKind kind; - } hipMemcpyToSymbol; - struct - { - const void* symbol; - const void* src; - size_t sizeBytes; - size_t offset; - hipMemcpyKind kind; - hipStream_t stream; - } hipMemcpyToSymbolAsync; - struct - { - void* dst; - const void* src; - size_t sizeBytes; - hipMemcpyKind kind; - hipStream_t stream; - } hipMemcpyWithStream; - struct - { - void* dst; - int value; - size_t sizeBytes; - } hipMemset; - struct - { - void* dst; - size_t pitch; - int value; - size_t width; - size_t height; - } hipMemset2D; - struct - { - void* dst; - size_t pitch; - int value; - size_t width; - size_t height; - hipStream_t stream; - } hipMemset2DAsync; - struct - { - hipPitchedPtr pitchedDevPtr; - int value; - hipExtent extent; - } hipMemset3D; - struct - { - hipPitchedPtr pitchedDevPtr; - int value; - hipExtent extent; - hipStream_t stream; - } hipMemset3DAsync; - struct - { - void* dst; - int value; - size_t sizeBytes; - hipStream_t stream; - } hipMemsetAsync; - struct - { - hipDeviceptr_t dest; - unsigned short value; - size_t count; - } hipMemsetD16; - struct - { - hipDeviceptr_t dest; - unsigned short value; - size_t count; - hipStream_t stream; - } hipMemsetD16Async; - struct - { - hipDeviceptr_t dest; - int value; - size_t count; - } hipMemsetD32; - struct - { - hipDeviceptr_t dst; - int value; - size_t count; - hipStream_t stream; - } hipMemsetD32Async; - struct - { - hipDeviceptr_t dest; - unsigned char value; - size_t count; - } hipMemsetD8; - struct - { - hipDeviceptr_t dest; - unsigned char value; - size_t count; - hipStream_t stream; - } hipMemsetD8Async; - struct - { - hipMipmappedArray_t* pHandle; - hipMipmappedArray_t pHandle__val; - HIP_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc; - HIP_ARRAY3D_DESCRIPTOR pMipmappedArrayDesc__val; - unsigned int numMipmapLevels; - } hipMipmappedArrayCreate; - struct - { - hipMipmappedArray_t hMipmappedArray; - } hipMipmappedArrayDestroy; - struct - { - hipArray_t* pLevelArray; - hipArray_t pLevelArray__val; - hipMipmappedArray_t hMipMappedArray; - unsigned int level; - } hipMipmappedArrayGetLevel; - struct - { - hipFunction_t* function; - hipFunction_t function__val; - hipModule_t module; - const char* kname; - char kname__val; - } hipModuleGetFunction; - struct - { - hipDeviceptr_t* dptr; - hipDeviceptr_t dptr__val; - size_t* bytes; - size_t bytes__val; - hipModule_t hmod; - const char* name; - char name__val; - } hipModuleGetGlobal; - struct - { - textureReference** texRef; - textureReference* texRef__val; - hipModule_t hmod; - const char* name; - char name__val; - } hipModuleGetTexRef; - struct - { - hipFunction_t f; - unsigned int gridDimX; - unsigned int gridDimY; - unsigned int gridDimZ; - unsigned int blockDimX; - unsigned int blockDimY; - unsigned int blockDimZ; - unsigned int sharedMemBytes; - hipStream_t stream; - void** kernelParams; - void* kernelParams__val; - } hipModuleLaunchCooperativeKernel; - struct - { - hipFunctionLaunchParams* launchParamsList; - hipFunctionLaunchParams launchParamsList__val; - unsigned int numDevices; - unsigned int flags; - } hipModuleLaunchCooperativeKernelMultiDevice; - struct - { - hipFunction_t f; - unsigned int gridDimX; - unsigned int gridDimY; - unsigned int gridDimZ; - unsigned int blockDimX; - unsigned int blockDimY; - unsigned int blockDimZ; - unsigned int sharedMemBytes; - hipStream_t stream; - void** kernelParams; - void* kernelParams__val; - void** extra; - void* extra__val; - } hipModuleLaunchKernel; - struct - { - hipModule_t* module; - hipModule_t module__val; - const char* fname; - char fname__val; - } hipModuleLoad; - struct - { - hipModule_t* module; - hipModule_t module__val; - const void* image; - } hipModuleLoadData; - struct - { - hipModule_t* module; - hipModule_t module__val; - const void* image; - unsigned int numOptions; - hipJitOption* options; - hipJitOption options__val; - void** optionsValues; - void* optionsValues__val; - } hipModuleLoadDataEx; - struct - { - int* numBlocks; - int numBlocks__val; - hipFunction_t f; - int blockSize; - size_t dynSharedMemPerBlk; - } hipModuleOccupancyMaxActiveBlocksPerMultiprocessor; - struct - { - int* numBlocks; - int numBlocks__val; - hipFunction_t f; - int blockSize; - size_t dynSharedMemPerBlk; - unsigned int flags; - } hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags; - struct - { - int* gridSize; - int gridSize__val; - int* blockSize; - int blockSize__val; - hipFunction_t f; - size_t dynSharedMemPerBlk; - int blockSizeLimit; - } hipModuleOccupancyMaxPotentialBlockSize; - struct - { - int* gridSize; - int gridSize__val; - int* blockSize; - int blockSize__val; - hipFunction_t f; - size_t dynSharedMemPerBlk; - int blockSizeLimit; - unsigned int flags; - } hipModuleOccupancyMaxPotentialBlockSizeWithFlags; - struct - { - hipModule_t module; - } hipModuleUnload; - struct - { - int* numBlocks; - int numBlocks__val; - const void* f; - int blockSize; - size_t dynamicSMemSize; - } hipOccupancyMaxActiveBlocksPerMultiprocessor; - struct - { - int* numBlocks; - int numBlocks__val; - const void* f; - int blockSize; - size_t dynamicSMemSize; - unsigned int flags; - } hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags; - struct - { - int* gridSize; - int gridSize__val; - int* blockSize; - int blockSize__val; - const void* f; - size_t dynSharedMemPerBlk; - int blockSizeLimit; - } hipOccupancyMaxPotentialBlockSize; - struct - { - void* data; - hipPointer_attribute attribute; - hipDeviceptr_t ptr; - } hipPointerGetAttribute; - struct - { - hipPointerAttribute_t* attributes; - hipPointerAttribute_t attributes__val; - const void* ptr; - } hipPointerGetAttributes; - struct - { - const void* value; - hipPointer_attribute attribute; - hipDeviceptr_t ptr; - } hipPointerSetAttribute; - struct - { - int* runtimeVersion; - int runtimeVersion__val; - } hipRuntimeGetVersion; - struct - { - int deviceId; - } hipSetDevice; - struct - { - unsigned int flags; - } hipSetDeviceFlags; - struct - { - const void* arg; - size_t size; - size_t offset; - } hipSetupArgument; - struct - { - const hipExternalSemaphore_t* extSemArray; - hipExternalSemaphore_t extSemArray__val; - const hipExternalSemaphoreSignalParams* paramsArray; - hipExternalSemaphoreSignalParams paramsArray__val; - unsigned int numExtSems; - hipStream_t stream; - } hipSignalExternalSemaphoresAsync; - struct - { - hipStream_t stream; - hipStreamCallback_t callback; - void* userData; - unsigned int flags; - } hipStreamAddCallback; - struct - { - hipStream_t stream; - void* dev_ptr; - size_t length; - unsigned int flags; - } hipStreamAttachMemAsync; - struct - { - hipStream_t stream; - hipStreamCaptureMode mode; - } hipStreamBeginCapture; - struct - { - hipStream_t* stream; - hipStream_t stream__val; - } hipStreamCreate; - struct - { - hipStream_t* stream; - hipStream_t stream__val; - unsigned int flags; - } hipStreamCreateWithFlags; - struct - { - hipStream_t* stream; - hipStream_t stream__val; - unsigned int flags; - int priority; - } hipStreamCreateWithPriority; - struct - { - hipStream_t stream; - } hipStreamDestroy; - struct - { - hipStream_t stream; - hipGraph_t* pGraph; - hipGraph_t pGraph__val; - } hipStreamEndCapture; - struct - { - hipStream_t stream; - hipStreamCaptureStatus* pCaptureStatus; - hipStreamCaptureStatus pCaptureStatus__val; - unsigned long long* pId; - unsigned long long pId__val; - } hipStreamGetCaptureInfo; - struct - { - hipStream_t stream; - hipStreamCaptureStatus* captureStatus_out; - hipStreamCaptureStatus captureStatus_out__val; - unsigned long long* id_out; - unsigned long long id_out__val; - hipGraph_t* graph_out; - hipGraph_t graph_out__val; - const hipGraphNode_t** dependencies_out; - const hipGraphNode_t* dependencies_out__val; - size_t* numDependencies_out; - size_t numDependencies_out__val; - } hipStreamGetCaptureInfo_v2; - struct - { - hipStream_t stream; - hipDevice_t* device; - hipDevice_t device__val; - } hipStreamGetDevice; - struct - { - hipStream_t stream; - unsigned int* flags; - unsigned int flags__val; - } hipStreamGetFlags; - struct - { - hipStream_t stream; - int* priority; - int priority__val; - } hipStreamGetPriority; - struct - { - hipStream_t stream; - hipStreamCaptureStatus* pCaptureStatus; - hipStreamCaptureStatus pCaptureStatus__val; - } hipStreamIsCapturing; - struct - { - hipStream_t stream; - } hipStreamQuery; - struct - { - hipStream_t stream; - } hipStreamSynchronize; - struct - { - hipStream_t stream; - hipGraphNode_t* dependencies; - hipGraphNode_t dependencies__val; - size_t numDependencies; - unsigned int flags; - } hipStreamUpdateCaptureDependencies; - struct - { - hipStream_t stream; - hipEvent_t event; - unsigned int flags; - } hipStreamWaitEvent; - struct - { - hipStream_t stream; - void* ptr; - unsigned int value; - unsigned int flags; - unsigned int mask; - } hipStreamWaitValue32; - struct - { - hipStream_t stream; - void* ptr; - uint64_t value; - unsigned int flags; - uint64_t mask; - } hipStreamWaitValue64; - struct - { - hipStream_t stream; - void* ptr; - unsigned int value; - unsigned int flags; - } hipStreamWriteValue32; - struct - { - hipStream_t stream; - void* ptr; - uint64_t value; - unsigned int flags; - } hipStreamWriteValue64; - struct - { - hipDeviceptr_t* dev_ptr; - hipDeviceptr_t dev_ptr__val; - const textureReference* texRef; - textureReference texRef__val; - } hipTexRefGetAddress; - struct - { - unsigned int* pFlags; - unsigned int pFlags__val; - const textureReference* texRef; - textureReference texRef__val; - } hipTexRefGetFlags; - struct - { - hipArray_Format* pFormat; - hipArray_Format pFormat__val; - int* pNumChannels; - int pNumChannels__val; - const textureReference* texRef; - textureReference texRef__val; - } hipTexRefGetFormat; - struct - { - int* pmaxAnsio; - int pmaxAnsio__val; - const textureReference* texRef; - textureReference texRef__val; - } hipTexRefGetMaxAnisotropy; - struct - { - hipMipmappedArray_t* pArray; - hipMipmappedArray_t pArray__val; - const textureReference* texRef; - textureReference texRef__val; - } hipTexRefGetMipMappedArray; - struct - { - float* pbias; - float pbias__val; - const textureReference* texRef; - textureReference texRef__val; - } hipTexRefGetMipmapLevelBias; - struct - { - float* pminMipmapLevelClamp; - float pminMipmapLevelClamp__val; - float* pmaxMipmapLevelClamp; - float pmaxMipmapLevelClamp__val; - const textureReference* texRef; - textureReference texRef__val; - } hipTexRefGetMipmapLevelClamp; - struct - { - size_t* ByteOffset; - size_t ByteOffset__val; - textureReference* texRef; - textureReference texRef__val; - hipDeviceptr_t dptr; - size_t bytes; - } hipTexRefSetAddress; - struct - { - textureReference* texRef; - textureReference texRef__val; - const HIP_ARRAY_DESCRIPTOR* desc; - HIP_ARRAY_DESCRIPTOR desc__val; - hipDeviceptr_t dptr; - size_t Pitch; - } hipTexRefSetAddress2D; - struct - { - textureReference* tex; - textureReference tex__val; - hipArray_const_t array; - unsigned int flags; - } hipTexRefSetArray; - struct - { - textureReference* texRef; - textureReference texRef__val; - float* pBorderColor; - float pBorderColor__val; - } hipTexRefSetBorderColor; - struct - { - textureReference* texRef; - textureReference texRef__val; - unsigned int Flags; - } hipTexRefSetFlags; - struct - { - textureReference* texRef; - textureReference texRef__val; - hipArray_Format fmt; - int NumPackedComponents; - } hipTexRefSetFormat; - struct - { - textureReference* texRef; - textureReference texRef__val; - unsigned int maxAniso; - } hipTexRefSetMaxAnisotropy; - struct - { - textureReference* texRef; - textureReference texRef__val; - float bias; - } hipTexRefSetMipmapLevelBias; - struct - { - textureReference* texRef; - textureReference texRef__val; - float minMipMapLevelClamp; - float maxMipMapLevelClamp; - } hipTexRefSetMipmapLevelClamp; - struct - { - textureReference* texRef; - textureReference texRef__val; - hipMipmappedArray* mipmappedArray; - hipMipmappedArray mipmappedArray__val; - unsigned int Flags; - } hipTexRefSetMipmappedArray; - struct - { - hipStreamCaptureMode* mode; - hipStreamCaptureMode mode__val; - } hipThreadExchangeStreamCaptureMode; - struct - { - hipUserObject_t* object_out; - hipUserObject_t object_out__val; - void* ptr; - hipHostFn_t destroy; - unsigned int initialRefcount; - unsigned int flags; - } hipUserObjectCreate; - struct - { - hipUserObject_t object; - unsigned int count; - } hipUserObjectRelease; - struct - { - hipUserObject_t object; - unsigned int count; - } hipUserObjectRetain; - struct - { - const hipExternalSemaphore_t* extSemArray; - hipExternalSemaphore_t extSemArray__val; - const hipExternalSemaphoreWaitParams* paramsArray; - hipExternalSemaphoreWaitParams paramsArray__val; - unsigned int numExtSems; - hipStream_t stream; - } hipWaitExternalSemaphoresAsync; - } args; - uint64_t* phase_data; -} hip_api_data_t; - // helper macros ensuring C and C++ structs adhere to specific naming convention #define ROCP_PUBLIC_CONFIG(TYPE) ::rocprofiler_##TYPE #define ROCP_PRIVATE_CONFIG(TYPE) ::rocprofiler::internal::TYPE @@ -3845,7 +155,7 @@ ROCP_ASSERT_CONFIG_ABI(config) ROCP_ASSERT_CONFIG_OFFSET_ABI(config, size, size) ROCP_ASSERT_CONFIG_OFFSET_ABI(config, compat_version, compat_version) ROCP_ASSERT_CONFIG_OFFSET_ABI(config, api_version, api_version) -ROCP_ASSERT_CONFIG_OFFSET_ABI(config, reserved0, session_idx) +ROCP_ASSERT_CONFIG_OFFSET_ABI(config, reserved0, context_idx) ROCP_ASSERT_CONFIG_OFFSET_ABI(config, user_data, user_data) ROCP_ASSERT_CONFIG_OFFSET_ABI(config, buffer, buffer) ROCP_ASSERT_CONFIG_OFFSET_ABI(config, domain, domain) @@ -4002,7 +312,7 @@ rocprofiler_allocate_config(rocprofiler_config* _inp_cfg) _cfg->size = sizeof(::rocprofiler_config); _cfg->compat_version = 0; _cfg->api_version = ROCPROFILER_API_VERSION_ID; - _cfg->session_idx = std::numeric_limitssession_idx)>::max(); + _cfg->context_idx = std::numeric_limitscontext_idx)>::max(); // initial value checks assert(_cfg->size == sizeof(rocprofiler::internal::config)); @@ -4011,8 +321,8 @@ rocprofiler_allocate_config(rocprofiler_config* _inp_cfg) assert(_cfg->buffer == nullptr); assert(_cfg->domain == nullptr); assert(_cfg->filter == nullptr); - assert(_cfg->session_idx == - std::numeric_limits::max()); + assert(_cfg->context_idx == + std::numeric_limits::max()); // ... allocate any internal space needed to handle another config ... { @@ -4039,7 +349,7 @@ rocprofiler_validate_config(const rocprofiler_config* cfg_v) } rocprofiler_status_t -rocprofiler_start_config(rocprofiler_config* cfg_v, rocprofiler_session_id_t* session_id) +rocprofiler_start_config(rocprofiler_config* cfg_v, rocprofiler_context_id_t* context_id) { if(rocprofiler_validate_config(cfg_v) != ROCPROFILER_STATUS_SUCCESS) { @@ -4067,12 +377,12 @@ rocprofiler_start_config(rocprofiler_config* cfg_v, rocprofiler_session_id_t* se } // too many configs already registered - if(idx == rocp_max_configs) return ROCPROFILER_STATUS_ERROR_SESSION_NOT_ACTIVE; + if(idx == rocp_max_configs) return ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_ACTIVE; - cfg->session_idx = idx; - session_id->handle = idx; + cfg->context_idx = idx; + context_id->handle = idx; - // using the session id, compute the location in the buffer of configs + // using the context id, compute the location in the buffer of configs auto* _offset = get_configs_buffer() + (idx * sizeof(rocprofiler::internal::config)); // placement new into the buffer @@ -4092,13 +402,13 @@ rocprofiler_start_config(rocprofiler_config* cfg_v, rocprofiler_session_id_t* se bool success = rocprofiler::internal::get_active_configs().at(idx).compare_exchange_strong( _expected, rocprofiler::internal::get_registered_configs().at(idx)); - if(!success) return ROCPROFILER_STATUS_ERROR_HAS_ACTIVE_SESSION; // need relevant enum + if(!success) return ROCPROFILER_STATUS_ERROR_HAS_ACTIVE_CONTEXT; // need relevant enum return ROCPROFILER_STATUS_SUCCESS; } rocprofiler_status_t -rocprofiler_stop_config(rocprofiler_session_id_t idx) +rocprofiler_stop_config(rocprofiler_context_id_t idx) { // atomically assign the config pointer to NULL so that it is skipped in future // callbacks @@ -4109,7 +419,7 @@ rocprofiler_stop_config(rocprofiler_session_id_t idx) .compare_exchange_strong(_expected, nullptr); if(!success) - return ROCPROFILER_STATUS_ERROR_SESSION_NOT_FOUND; // compare exchange strong + return ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND; // compare exchange strong // failed return ROCPROFILER_STATUS_SUCCESS; @@ -4120,7 +430,8 @@ rocprofiler_domain_add_domain(struct rocprofiler_domain_config* _inp_cfg, rocprofiler_tracer_activity_domain_t _domain) { auto* _cfg = rocp_cast(_inp_cfg); - if(_domain <= ACTIVITY_DOMAIN_NONE || _domain >= ACTIVITY_DOMAIN_NUMBER) + if(_domain <= ROCPROFILER_TRACER_ACTIVITY_DOMAIN_NONE || + _domain >= ROCPROFILER_TRACER_ACTIVITY_DOMAIN_LAST) return ROCPROFILER_STATUS_ERROR_INVALID_DOMAIN_ID; _cfg->domains |= (1 << _domain); @@ -4146,7 +457,8 @@ rocprofiler_domain_add_op(struct rocprofiler_domain_config* _inp_cfg, uint32_t _op) { auto* _cfg = rocp_cast(_inp_cfg); - if(_domain <= ACTIVITY_DOMAIN_NONE || _domain >= ACTIVITY_DOMAIN_NUMBER) + if(_domain <= ROCPROFILER_TRACER_ACTIVITY_DOMAIN_NONE || + _domain >= ROCPROFILER_TRACER_ACTIVITY_DOMAIN_LAST) return ROCPROFILER_STATUS_ERROR_INVALID_DOMAIN_ID; if(_op >= get_domain_max_op(_domain)) return ROCPROFILER_STATUS_ERROR_INVALID_OPERATION_ID; @@ -4179,7 +491,7 @@ rocprofiler_domain_add_ops(struct rocprofiler_domain_config* _inp_cfg, void api_callback(rocprofiler_tracer_activity_domain_t domain, uint32_t cid, - const void* callback_data, + const void* /*callback_data*/, void*) { for(const auto& aitr : rocprofiler::internal::get_active_configs()) @@ -4195,13 +507,13 @@ api_callback(rocprofiler_tracer_activity_domain_t domain, if(itr->filter) { - if(domain == ACTIVITY_DOMAIN_ROCTX) + if(domain == ROCPROFILER_TRACER_ACTIVITY_DOMAIN_ROCTX) {} - else if(domain == ACTIVITY_DOMAIN_HSA_API) + else if(domain == ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API) { if(itr->filter->hsa_function_id && itr->filter->hsa_function_id(cid) == 0) continue; } - else if(domain == ACTIVITY_DOMAIN_HIP_API) + else if(domain == ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HIP_API) { if(itr->filter->hip_function_id && itr->filter->hip_function_id(cid) == 0) continue; } @@ -4219,17 +531,20 @@ api_callback(rocprofiler_tracer_activity_domain_t domain, return std::chrono::steady_clock::now().time_since_epoch().count(); }; + (void) _domain; + (void) timestamp_ns; + /* auto _header = rocprofiler_record_header_t{ROCPROFILER_TRACER_RECORD, rocprofiler_record_id_t{_correlation_id}}; auto _op_id = rocprofiler_tracer_operation_id_t{cid}; auto _agent_id = rocprofiler_agent_id_t{0}; auto _queue_id = rocprofiler_queue_id_t{0}; auto _thread_id = rocprofiler_thread_id_t{get_tid()}; - auto _session = rocprofiler_session_id_t{itr->session_idx}; + auto _context = rocprofiler_context_id_t{itr->context_idx}; auto _timestamp_raw = rocprofiler_timestamp_t{timestamp_ns()}; auto _timestamp = rocprofiler_record_header_timestamp_t{_timestamp_raw, _timestamp_raw}; - if(domain == ACTIVITY_DOMAIN_ROCTX) + if(domain == ROCPROFILER_TRACER_ACTIVITY_DOMAIN_ROCTX) { auto _api_data = rocprofiler_tracer_api_data_t{}; const roctx_api_data_t* _data = @@ -4259,9 +574,9 @@ api_callback(rocprofiler_tracer_activity_domain_t domain, _thread_id, _phase, _name}, - _session); + _context); } - else if(domain == ACTIVITY_DOMAIN_HSA_API) + else if(domain == ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API) { auto _api_data = rocprofiler_tracer_api_data_t{}; const hsa_api_data_t* _data = reinterpret_cast(callback_data); @@ -4293,9 +608,9 @@ api_callback(rocprofiler_tracer_activity_domain_t domain, _thread_id, _phase, _name}, - _session); + _context); } - else if(domain == ACTIVITY_DOMAIN_HIP_API) + else if(domain == ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HIP_API) { auto _api_data = rocprofiler_tracer_api_data_t{}; const hip_api_data_t* _data = reinterpret_cast(callback_data); @@ -4327,8 +642,9 @@ api_callback(rocprofiler_tracer_activity_domain_t domain, _thread_id, _phase, _name}, - _session); + _context); } + */ } } @@ -4342,7 +658,9 @@ InitRoctracer() // below should be valid so this might need to raise error if(!itr->domain) continue; - for(auto ditr : {ACTIVITY_DOMAIN_ROCTX, ACTIVITY_DOMAIN_HSA_API, ACTIVITY_DOMAIN_HIP_API}) + for(auto ditr : {ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API, + ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HIP_API, + ROCPROFILER_TRACER_ACTIVITY_DOMAIN_ROCTX}) { if((*itr->domain)(ditr)) { @@ -4357,7 +675,8 @@ InitRoctracer() } } - for(auto ditr : {ACTIVITY_DOMAIN_HSA_OPS, ACTIVITY_DOMAIN_HIP_OPS}) + for(auto ditr : {ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_OPS, + ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HIP_OPS}) { if((*itr->domain)(ditr)) { diff --git a/source/lib/rocprofiler/tracer.hpp b/source/lib/rocprofiler/tracer.hpp index b713e9b83e..43cd6840c9 100644 --- a/source/lib/rocprofiler/tracer.hpp +++ b/source/lib/rocprofiler/tracer.hpp @@ -27,16 +27,14 @@ #include #include -#include -#include typedef struct { - rocprofiler_session_id_t session_id; + rocprofiler_context_id_t context_id; rocprofiler_buffer_id_t buffer_id; -} session_buffer_id_t; +} context_buffer_id_t; -typedef session_buffer_id_t roctracer_pool_t; +typedef context_buffer_id_t roctracer_pool_t; /* Correlation id */ typedef uint64_t activity_correlation_id_t;