README.md 747 Bytes
Newer Older
wangkaixiong's avatar
init  
wangkaixiong committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# 工程介绍

roctracer_python 是基于DTK下的hiptx,即 roctracer 进行了python封装,实现了 python 代码中的指定代码段的性能标记,可以极大限度地提升性能分析的效率。

tests 目录下存放了测试代码,可以作为参考。

使用效果:

![show](./images/profiling.png)


roctracer_python/tests/test_roctracer.py 中进行了2处mark,在图中第一行清晰地展示出两个mark开始与结束。

- Memory Copy
- Model infer


编译使用方法:

```bash

mkdir build && cd build

cmake ..
make -j8
make install
cd ..
pythpn setup.py install

```

测试方法:

编译安装完成后,进行测试;

```bash

cd tests
hipprof --hip-trace --hiptx-hiptrace python3 test_roctracer.py
```