2018-06-15 13:49:29 -05:00
|
|
|
# ROC-tracer
|
2018-08-26 19:27:36 -05:00
|
|
|
```
|
|
|
|
|
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.
|
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.
|
|
|
|
|
```
|
2018-06-04 15:43:09 -05:00
|
|
|
|
2019-02-20 14:47:42 -06:00
|
|
|
## The library source tree
|
|
|
|
|
```
|
2018-06-04 15:43:09 -05:00
|
|
|
- inc/roctracer.h - Library public API
|
|
|
|
|
- src - Library sources
|
|
|
|
|
- core - Library API sources
|
|
|
|
|
- util - Library utils sources
|
|
|
|
|
- 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
|
|
|
|
|
```
|
|
|
|
|
- API description: inc/roctracer.h
|
2019-04-25 14:15:03 -05:00
|
|
|
- Code example: test/MatrixTranspose_test/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
|
|
|
```
|
2019-04-25 14:17:36 -05:00
|
|
|
- ROCm-2.3 or higher is required
|
|
|
|
|
|
2018-08-26 18:02:53 -05:00
|
|
|
cd <your path>
|
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-04-26 14:56:38 -05:00
|
|
|
export HIP_PATH=/opt/rocm/hip
|
|
|
|
|
export HCC_HOME=/opt/rocm/hcc
|
2019-02-08 20:01:44 -06:00
|
|
|
export CMAKE_PREFIX_PATH=/opt/rocm
|
2018-08-08 15:47:30 -05:00
|
|
|
|
2018-08-26 18:02:53 -05:00
|
|
|
- Build ROCtracer
|
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-02-04 17:36:21 -06:00
|
|
|
- To build and run test
|
|
|
|
|
make mytest
|
|
|
|
|
run.sh
|
2018-11-13 18:51:56 -06:00
|
|
|
|
|
|
|
|
- To install
|
|
|
|
|
make install
|
|
|
|
|
or
|
|
|
|
|
make package && dpkg -i *.deb
|
2018-06-15 13:49:29 -05:00
|
|
|
```
|