From b30b5b84e7c5ce38b1e9d7139f09787d1c5a05bf Mon Sep 17 00:00:00 2001 From: Tony Tye Date: Fri, 15 Apr 2022 20:29:31 +0000 Subject: [PATCH] Update README.md Improve formating and correct build directions. Change-Id: I06b97e206e014c29c0c9f3b34dedd683448728f2 --- README.md | 174 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 119 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index e700ee403a..67f8589ee6 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,139 @@ # 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 asyncronous activity. -The API provides functionality for registering the runtimes API callbacks and -asyncronous activity records pool support. +- **ROC-tracer library: Runtimes Generic Callback/Activity APIs** -ROC-TX librray: code annotation evemts API -Includes basic API: roctxMark, roctxRangePush, roctxRangePop. -``` + 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 librray: - - the API header: /opt/rocm/roctracer/include/roctracer.h - - the .so library: /opt/rocm/lib/libroctracer64.so -rocTX API: - To use the rocTX API you need the API header and to link your application with roctx .so librray: - - the API header: /opt/rocm/roctracer/include/roctx.h - - the .so library: /opt/rocm/lib/libroctx64.so -``` +### `rocTracer` API -## The library source tree -``` - - doc - documentation - - inc/roctracer.h - rocTacer library public API header - - inc/roctx.h - rocTX library puiblic 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 -``` +To use the rocTracer API you need the API header and to link your application with `roctracer` .so library: + +- `/opt/rocm/roctracer/include/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 - - API description: - - ['roctracer' / 'rocTX' profiling C API specification](doc/roctracer_spec.md) - - Code examples: - - [test/MatrixTranspose_test/MatrixTranspose.cpp](test/MatrixTranspose_test/MatrixTranspose.cpp) - - [test/MatrixTranspose/MatrixTranspose.cpp](test/MatrixTranspose/MatrixTranspose.cpp) -## To build and run test -``` - - ROCm is required - - - Python modules requirements: CppHeaderParser, argparse. +- API description: + - ['roctracer' / 'rocTX' profiling C API specification](docroctracer_spec.md) +- Code examples: + - [test/MatrixTranspose_test/MatrixTranspose.cpp](testMatrixTranspose_test/MatrixTranspose.cpp) + - [test/MatrixTranspose/MatrixTranspose.cpp](test/MatrixTranspose/MatrixTranspose.cpp) + +## Build and run tests + +- ROCm is required + +- Python modules requirements: `CppHeaderParser`, `argparse`. + To install: - sudo pip install CppHeaderParser argparse - - CLone development branch of roctracer: + ```sh + pip3 install CppHeaderParser argparse + ``` + +- Clone development branch of `roctracer`: + + ```sh git clone -b amd-master https://github.com/ROCm-Developer-Tools/roctracer + ``` - - Set environment: - export CMAKE_PREFIX_PATH=/opt/rocm - - To use custom HIP version: - export HIP_PATH=/opt/rocm/hip +- To build `roctracer` library: - - To build roctracer library: - export CMAKE_BUILD_TYPE= # release by default - cd /roctracer && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm .. && make -j + ```sh + cd /roctracer + mkdir build && cd build + cmake -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_INSTALL_PREFIX=/opt/rocm .. + make + ``` - - To build and run test: +- To build and run test: + + ```sh make mytest run.sh - - - To install: + ``` + +## Installation + +Install by: + + ```sh make install - or + ``` + + or: + + ```sh make package && dpkg -i *.deb -``` + ```