Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
b91dbca6
Unverified
Commit
b91dbca6
authored
Mar 20, 2020
by
yongfeng-nv
Committed by
GitHub
Mar 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add colors to compute_at edges and thread/block indices. (#5111)
parent
841725cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
python/tvm/contrib/tedd.py
+20
-3
tests/python/contrib/test_tedd.py
+1
-1
No files found.
python/tvm/contrib/tedd.py
View file @
b91dbca6
...
...
@@ -37,6 +37,19 @@ ITERVAR_TYPE_STRING_MAP = {
8
:
(
'kTensorized'
,
'#A9DFBF'
),
}
PALETTE
=
{
0
:
'#000000'
,
1
:
'#922B21'
,
2
:
'#76448A'
,
3
:
'#1F618D'
,
4
:
'#148F77'
,
5
:
'#B7950B'
,
6
:
'#AF601A'
,
7
:
'#F5B7B1'
,
8
:
'#A9DFBF'
,
}
PALETTE_SIZE
=
9
def
dom_path_to_string
(
dom_path
,
prefix
=
""
):
path_string
=
prefix
...
...
@@ -458,8 +471,8 @@ def viz_schedule_tree(sch,
var_attr_label
=
''
if
"thread"
in
leafiv
[
"properties"
]
and
\
leafiv
[
"properties"
][
"thread"
]
is
not
None
:
var_attr_label
=
var_attr_label
+
"<br/>("
+
str
(
leafiv
[
"properties"
][
"thread"
])
+
")"
var_attr_label
=
var_attr_label
+
"<br/>
<font color=
\"
#2980B9
\"
>
("
+
str
(
leafiv
[
"properties"
][
"thread"
])
+
")
</font>
"
if
"intrin"
in
leafiv
[
"properties"
]
and
\
leafiv
[
"properties"
][
"intrin"
]
is
not
None
:
var_attr_label
=
var_attr_label
+
"<br/>"
+
\
...
...
@@ -483,7 +496,11 @@ def viz_schedule_tree(sch,
[
stage
[
"attaching_to"
][
0
]],
"Stage"
)
+
":"
+
dom_path_to_string
(
stage
[
"attaching_to"
],
"IterVar"
)
if
stage
[
"attaching_to"
]
is
not
None
else
"ROOT"
g
.
edge
(
src
,
dst
)
color
=
PALETTE
[
stage
[
"attaching_to"
][
1
]
+
1
]
if
stage
[
"attaching_to"
]
is
not
None
and
stage
[
"attaching_to"
][
1
]
<
PALETTE_SIZE
-
1
else
PALETTE
[
0
]
g
.
edge
(
src
,
dst
,
color
=
color
)
graph
=
create_schedule_tree_graph
(
"Schedule Tree"
)
s
=
extract_dom_for_viz
(
sch
)
...
...
tests/python/contrib/test_tedd.py
View file @
b91dbca6
...
...
@@ -125,7 +125,7 @@ def test_schedule_tree():
findany
(
r"r.outer\(kCommReduce\)"
,
str
)
findany
(
r"label=ROOT"
,
str
)
# Check the compute_at edge
findany
(
r"Stage_1"
,
str
)
findany
(
r"Stage_1
.*\[color\=\"\#000000\"\]
"
,
str
)
if
checkdepdency
():
verify
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment