You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by wu...@apache.org on 2020/04/14 06:48:05 UTC
[incubator-tvm] branch master updated: [TE][BuildModule] Fix import
in dump pass ir (#5327)
This is an automated email from the ASF dual-hosted git repository.
wuwei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
The following commit(s) were added to refs/heads/master by this push:
new 1df6bb6 [TE][BuildModule] Fix import in dump pass ir (#5327)
1df6bb6 is described below
commit 1df6bb6d3080789e21b9eec8924949463593c757
Author: Wuwei Lin <vi...@gmail.com>
AuthorDate: Tue Apr 14 02:47:57 2020 -0400
[TE][BuildModule] Fix import in dump pass ir (#5327)
---
python/tvm/target/build_config.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/python/tvm/target/build_config.py b/python/tvm/target/build_config.py
index 6a0dcf7..8aae6be 100644
--- a/python/tvm/target/build_config.py
+++ b/python/tvm/target/build_config.py
@@ -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