-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
37 lines (28 loc) · 1.1 KB
/
run.py
File metadata and controls
37 lines (28 loc) · 1.1 KB
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
from aie_tools.placer import *
from aie_tools.flow import *
from aie_tools.buffer_place import show_buffer_place
vck190 = Device(1, 8, 50, 0)
vek280 = Device(2, 8, 38, 2)
vd100 = Device(2, 3, 17, 1)
def place_core():
graph = build_graph("./aie/build/hw/Work/temp/graph.json", vek280)
load_aiecst(graph, "./aie/mapping.aiecst")
show_core_place(graph)
save_aiecst(graph, "./aie/mapping.aiecst")
def place_buffer():
graph = build_graph('./trace_reports/compiler_report.json')
load_aiecst(graph, "./aie/mapping.aiecst")
show_buffer_place(graph)
save_aiecst(graph, "./aie/mapping.aiecst")
def analyze_event():
graph = build_graph('./trace_reports/compiler_report.json')
load_event('./trace_reports/events.txt', graph)
for i, e in enumerate(graph.blocks['i6'].events):
if e.event == 'AIE_CORE_READY' and graph.blocks['i6'].events[i-1].event == 'CORE_WAIT':
why_core_ready(graph, 'i6', i)
if e.event == 'CORE_WAIT':
why_core_stall(graph, 'i6', i)
# 根据需要解注释对应的函数。
place_core()
# place_buffer()
# analyze_event()