Laurent Morichetti 6416434d3b Fix a profiling data corrupted error
Using rocprof with ROCP_MCOPY_DATA=1 while tracing HSA produces the
following error:

tblextr.py: Memcpy args "(0x7feb16a00000, 123handle=28593376125, 0x7feb12a00010, 123handle=27558560125, 4194304, 0, 0, 123handle=140661639440000125) = 1" cannot be identified
Profiling data corrupted: ' ./out/rpl_data_220930_143009_1826700/input_results_220930_143009/results.txt'

There are two issues:

1) The hsa_agent_t handle argument is misprinted: "123handle=...125"
  Instead of printing '{' and '}', it prints '123' and '125'. The wrong
  operator<<(unsigned char) is used and an integer value is printed
  instead of a char.

  Use std::operator<< instead of hsa_support::detail::operator<< to
  print '{' and '}'

2) The result value is unitialized and in some cases printed as a
  negative integer value. The leading '-' is not matched by the
  mem_manager regular expresion for HSA api calls.

  Correctly capture the HSA function's return value.

Change-Id: If13a1e62eeb4e598447c4b90d53d1b2e3b408696
2022-09-30 13:36:48 -07:00
2022-08-11 10:13:36 -05:00
2022-09-13 08:23:40 -07:00
2022-09-13 08:23:40 -07:00
2022-05-20 10:36:38 -07:00
2022-05-21 16:14:09 -04:00
2022-05-21 16:14:09 -04:00
2022-08-11 10:13:36 -05:00
2022-04-19 09:30:45 -07:00
2022-05-16 13:30:49 -05:00

ROC-tracer

  • ROC-tracer library: Runtimes Generic Callback/Activity APIs

    The goal of the implementation is to provide a generic independent from specific runtime profiler to trace API and asynchronous activity.

    The API provides functionality for registering the runtimes API callbacks and asynchronous activity records pool support.

  • ROC-TX library: Code Annotation Events API

    Includes API for:

    • roctxMark
    • roctxRangePush
    • roctxRangePop

Usage

rocTracer API

To use the rocTracer API you need the API header and to link your application with roctracer .so library:

  • /opt/rocm/include/roctracer/roctracer.h

    API header.

  • /opt/rocm/lib/libroctracer64.so

    .so library.

rocTX API

To use the rocTX API you need the API header and to link your application with roctx .so library:

  • /opt/rocm/roctracer/include/roctx.h

    API header.

  • /opt/rocm/lib/libroctx64.so

    .so library.

Library source tree

  • doc

    Documentation.

  • inc

    Include header files.

    • roctracer.h

      rocTacer library public API header.

    • roctx.h

      rocTX library public API header.

  • src

    Library sources.

    • core

      rocTracer library API sources.

    • roctx

      rocTX library API sources.

    • util

      Library utils sources.

  • test

    Test suit.

    • MatrixTranspose

      Test based on HIP MatrixTranspose sample.

Documentation

Build and run tests

  • ROCm is required

  • Packages required:

    1. For Ubuntu 18.04 and Ubuntu 20.04 the following adds the needed packages:
    apt install python3 python3-pip gcc g++ libatomic1 make \
     cmake doxygen graphviz texlive-full
    
    1. For CentOS 8.1 and RHEL 8.1 the following adds the needed packages:
    yum install -y python3 python3-pip gcc gcc-g++ make \
     cmake libatomic doxygen graphviz texlive \
     texlive-xtab texlive-multirow texlive-sectsty \
     texlive-tocloft texlive-tabu texlive-adjustbox
    
    1. For SLES 15 Service Pack 15 the following adds the needed packages:
    zypper in python3 python3-pip gcc gcc-g++ make \
     cmake libatomic doxygen graphviz \
     texlive-scheme-medium texlive-hanging texlive-stackengine \
     texlive-tocloft texlive-etoc texlive-tabu
    
  • Python modules requirements: CppHeaderParser, argparse.

    To install:

    pip3 install CppHeaderParser argparse
    
  • Clone development branch of roctracer:

    git clone -b amd-master https://github.com/ROCm-Developer-Tools/roctracer
    
  • To build roctracer library:

    cd <your path>/roctracer
    ./build.sh
    
  • To build and run test:

    cd <your path>/roctracer/build
    make mytest
    run.sh
    

Installation

Install by:

make install

or:

make package && dpkg -i *.deb
S
Description
No description provided
Readme 282 MiB
Languages
C++ 67.5%
C 20.6%
Python 6.6%
CMake 3.4%
Shell 0.6%
Other 1.1%