Commit 25a7b46c by xqdan Committed by Tianqi Chen

fix dump ir (#2235)

parent 7f32f0b5
...@@ -5,8 +5,8 @@ LoweredFunc and compiled Module. ...@@ -5,8 +5,8 @@ LoweredFunc and compiled Module.
""" """
from __future__ import absolute_import as _abs from __future__ import absolute_import as _abs
import warnings import warnings
import types
from ._ffi.function import Function
from ._ffi.node import NodeBase, register_node from ._ffi.node import NodeBase, register_node
from . import api from . import api
from . import _api_internal from . import _api_internal
...@@ -69,7 +69,7 @@ class DumpIR(object): ...@@ -69,7 +69,7 @@ class DumpIR(object):
vset[k] = v vset[k] = v
for k, v in vset.items(): for k, v in vset.items():
self._recover_list.append(recover) self._recover_list.append(recover)
vset[k] = self.decorate(v) if isinstance(v, types.FunctionType) else v vset[k] = self.decorate(v) if isinstance(v, Function) else v
def decorate_custompass(self, custom_pass): def decorate_custompass(self, custom_pass):
"""decorate given list of custom passes, and return decorated passes""" """decorate given list of custom passes, and return decorated passes"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment