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
1df6bb6d
Unverified
Commit
1df6bb6d
authored
Apr 14, 2020
by
Wuwei Lin
Committed by
GitHub
Apr 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TE][BuildModule] Fix import in dump pass ir (#5327)
parent
b7545eb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
python/tvm/target/build_config.py
+5
-5
No files found.
python/tvm/target/build_config.py
View file @
1df6bb6d
...
...
@@ -59,15 +59,15 @@ class DumpIR(object):
def
decorate_irpass
(
self
):
"""decorate ir_pass and ScheduleOps"""
self
.
_old_sgpass
=
schedule
.
ScheduleOps
schedule
.
ScheduleOps
=
self
.
decorate
(
schedule
.
ScheduleOps
)
vset
=
vars
(
ir_pass
)
self
.
_old_sgpass
=
tvm
.
te
.
schedule
.
ScheduleOps
tvm
.
te
.
schedule
.
ScheduleOps
=
self
.
decorate
(
tvm
.
te
.
schedule
.
ScheduleOps
)
vset
=
vars
(
tvm
.
tir
.
ir_pass
)
k
=
v
=
0
def
recover
():
vset
[
k
]
=
v
for
k
,
v
in
vset
.
items
():
self
.
_recover_list
.
append
(
recover
)
vset
[
k
]
=
self
.
decorate
(
v
)
if
isinstance
(
v
,
Function
)
else
v
vset
[
k
]
=
self
.
decorate
(
v
)
if
isinstance
(
v
,
tvm
.
runtime
.
PackedFunc
)
else
v
def
decorate_custompass
(
self
,
custom_pass
):
"""decorate given list of custom passes, and return decorated passes"""
...
...
@@ -93,7 +93,7 @@ class DumpIR(object):
# recover decorated functions
for
f
in
self
.
_recover_list
:
f
()
schedule
.
ScheduleOps
=
self
.
_old_sgpass
tvm
.
te
.
schedule
.
ScheduleOps
=
self
.
_old_sgpass
DumpIR
.
scope_level
-=
1
...
...
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