Files
rocm-systems/README.md
T

77 rader
2.4 KiB
Markdown
Normal vy Historik

2018-06-15 13:49:29 -05:00
# ROC-tracer
2018-08-26 19:27:36 -05:00
```
2019-11-22 17:49:37 -06:00
ROC-tracer library: Runtimes Generic Callback/Activity APIs.
2018-08-26 19:27:36 -05:00
The goal of the implementation is to provide a generic independent from
specific runtime profiler to trace API and asyncronous activity.
2018-06-15 13:49:29 -05:00
2018-08-26 19:27:36 -05:00
The API provides functionality for registering the runtimes API callbacks and
asyncronous activity records pool support.
2019-11-22 17:49:37 -06:00
ROC-TX librray: code annotation evemts API
Includes basic API: roctxMark, roctxRangePush, roctxRangePop.
2018-08-26 19:27:36 -05:00
```
2018-06-04 15:43:09 -05:00
2020-01-07 17:11:22 -06:00
## 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
```
2019-02-20 14:47:42 -06:00
## The library source tree
```
2020-01-06 13:42:02 -06:00
- doc - documentation
2019-11-22 17:49:37 -06:00
- inc/roctracer.h - rocTacer library public API header
- inc/roctx.h - rocTX library puiblic API header
2018-06-04 15:43:09 -05:00
- src - Library sources
2019-11-22 17:49:37 -06:00
- core - rocTracer library API sources
- roctx - rocTX library API sources
- util - library utils sources
2018-06-04 15:43:09 -05:00
- test - test suit
- MatrixTranspose - test based on HIP MatrixTranspose sample
2019-02-20 14:47:42 -06:00
```
2018-06-04 15:43:09 -05:00
2018-08-26 19:27:36 -05:00
## Documentation
2020-01-06 13:42:02 -06:00
- API description:
2020-01-11 05:40:02 -06:00
- ['roctracer' / 'rocTX' profiling C API specification](doc/roctracer_spec.md)
2019-11-22 17:49:37 -06:00
- Code examples:
2020-01-06 13:42:02 -06:00
- [test/MatrixTranspose_test/MatrixTranspose.cpp](test/MatrixTranspose_test/MatrixTranspose.cpp)
- [test/MatrixTranspose/MatrixTranspose.cpp](test/MatrixTranspose/MatrixTranspose.cpp)
2018-08-26 19:27:36 -05:00
2018-08-26 18:02:53 -05:00
## To build and run test
2018-06-15 13:49:29 -05:00
```
2020-01-07 13:11:25 -06:00
- ROCm is required
2020-01-07 13:13:16 -06:00
2020-01-14 10:32:05 -06:00
- Python modules requirements: CppHeaderParser, argparse.
2019-11-14 10:13:42 -06:00
To install:
2019-11-14 10:13:08 -06:00
sudo pip install CppHeaderParser argparse
2018-06-04 15:43:09 -05:00
2019-04-25 14:18:19 -05:00
- CLone development branch of roctracer:
2019-09-04 12:04:27 -05:00
git clone -b amd-master https://github.com/ROCm-Developer-Tools/roctracer
2018-06-04 15:43:09 -05:00
2018-08-26 18:02:53 -05:00
- Set environment:
2019-12-18 19:53:25 -06:00
export CMAKE_PREFIX_PATH=/opt/rocm
- To use custom HIP/HCC versions:
2019-04-26 14:56:38 -05:00
export HIP_PATH=/opt/rocm/hip
export HCC_HOME=/opt/rocm/hcc
2018-08-08 15:47:30 -05:00
2019-12-18 19:55:16 -06:00
- To build roctracer library:
2019-08-11 08:56:39 -05:00
export CMAKE_BUILD_TYPE=<debug|release> # release by default
2018-11-13 17:09:58 -06:00
cd <your path>/roctracer && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm .. && make -j <nproc>
2018-08-26 18:02:53 -05:00
2019-12-18 19:55:16 -06:00
- To build and run test:
2019-02-04 17:36:21 -06:00
make mytest
run.sh
2018-11-13 18:51:56 -06:00
2019-12-18 19:55:16 -06:00
- To install:
2018-11-13 18:51:56 -06:00
make install
or
make package && dpkg -i *.deb
2018-06-15 13:49:29 -05:00
```