提交 44aa6ff2 authored 作者: Frederic's avatar Frederic

Remove the do_merge mechanism as it is dangerous and hard to use. Duplicate in…

Remove the do_merge mechanism as it is dangerous and hard to use. Duplicate in inplace opt the node as needed.
上级 21351eed
......@@ -655,16 +655,6 @@ class PureOp(object):
"""
return True
def do_merge(self, node):
"""This allow to disable the merge of ops in the graph.
This is very rarely a good idea to disable it. Do not use if
you do not understand this small comment. You probably do not
need it.
"""
return True
class Op(utils.object2, PureOp, CLinkerOp):
"""Convenience class to bundle `PureOp` and `CLinkerOp`"""
......
......@@ -509,8 +509,6 @@ class MergeFeature(object):
"""Check if a node can be merged, and queue that replacement."""
if node in self.nodes_seen:
return
if not node.op.do_merge(node):
return
# These asserts ensure that the fgraph has set the clients field
# properly.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论