-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.cpp
45 lines (36 loc) · 1.36 KB
/
test.cpp
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
41
42
43
44
45
#include "export.h"
#include <chrono>
/********************************************
_ooOoo_
o8888888o
88" . "88
(| -_- |)
O\ = /O
____/`---'\____
.' \\| |// `.
/ \\||| : |||// \
/ _||||| -:- |||||- \
| | \\\ - /// | |
| \_| ''\---/'' | |
\ .-\__ `-` ___/-. /
___`. .' /--.--\ `. . __
."" '< `.___\_<|>_/___.' >'"".
| | : `- \`.;`\ _ /`;.`/ - ` : | |
\ \ `-. \_ __\ /__ _/ .-` / /
======`-.____`-.___\_____/___.-`____.-'======
`=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
佛祖保佑 永无BUG
********************************************/
int main()
{
init("./a100-test-runner_1563552.train.1673890927432.pt.trace.json",
"./resnet50_all_metrics.train.csv", 10);
auto start_time = std::chrono::high_resolution_clock::now();
float fp32active = query("aten::zeros|torch", "KernelUsage", "KernelTime", "FuzzyName");
printf("Average fp32active: %f\n", fp32active);
auto end_time = std::chrono::high_resolution_clock::now();
std::chrono::duration<float, std::milli> duration = end_time - start_time;
printf("Query took %.3fms", duration.count());
return 0;
}