提交 9d0f2bae authored 作者: sentient07's avatar sentient07

Fixed the LocalGroupDB's register method

上级 1bd5031d
...@@ -1281,8 +1281,6 @@ class LocalOptGroup(LocalOptimizer): ...@@ -1281,8 +1281,6 @@ class LocalOptGroup(LocalOptimizer):
# Ensuring not the input of graph # Ensuring not the input of graph
assert repl[0].owner assert repl[0].owner
new_node = repl[0].owner new_node = repl[0].owner
if not getattr(new_node, 'fgraph', None):
continue
apply_mult_opts(opt_list, new_node, False) apply_mult_opts(opt_list, new_node, False)
return repl return repl
......
...@@ -393,7 +393,7 @@ class SequenceDB(DB): ...@@ -393,7 +393,7 @@ class SequenceDB(DB):
return sio.getvalue() return sio.getvalue()
class LocalGroupDB(SequenceDB): class LocalGroupDB(DB):
""" """
Generate a local optimizer of type LocalOptGroup instead Generate a local optimizer of type LocalOptGroup instead
of a global optimizer. of a global optimizer.
...@@ -410,7 +410,7 @@ class LocalGroupDB(SequenceDB): ...@@ -410,7 +410,7 @@ class LocalGroupDB(SequenceDB):
def query(self, *tags, **kwtags): def query(self, *tags, **kwtags):
# For the new `useless` optimizer # For the new `useless` optimizer
opts = super(LocalGroupDB, self).query(*tags, **kwtags) opts = super(LocalGroupDB, self).query(*tags, **kwtags)
ret = opt.LocalOptGroup(opts, apply_all_opts=self.apply_all_opts) ret = opt.LocalOptGroup(*opts, apply_all_opts=self.apply_all_opts)
return ret return ret
class TopoDB(DB): class TopoDB(DB):
...@@ -422,8 +422,6 @@ class TopoDB(DB): ...@@ -422,8 +422,6 @@ class TopoDB(DB):
""" """
seq_opt = opt.TopoOptimizer
def __init__(self, db, order='in_to_out', ignore_newtrees=False, def __init__(self, db, order='in_to_out', ignore_newtrees=False,
failure_callback=None): failure_callback=None):
super(TopoDB, self).__init__() super(TopoDB, self).__init__()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论