提交 e5ffc7ee authored 作者: sentient07's avatar sentient07

Adding LocalGroupDB to in2out

上级 ce906f6e
......@@ -159,7 +159,6 @@ optdb.register('useless', gof.optdb.TopoDB(local_useless),
# The opt should not do anything that need shape inference.
# New nodes that don't have infer_shape need that the original node
# also don't have infer_shape
optdb.register('merge1.1', gof.MergeOptimizer(),
0.65, 'fast_run', 'fast_compile', 'merge')
......
......@@ -369,7 +369,9 @@ compile.optdb.register('inplace_elemwise_opt', inplace_elemwise_optimizer, 75,
'inplace_elemwise_optimizer',
'fast_run', 'inplace')
position = 0
local_useless = LocalGroupDB()
def register_useless(lopt, *tags, **kwargs):
if type(lopt) == str:
def register(inner_lopt):
......@@ -379,9 +381,9 @@ def register_useless(lopt, *tags, **kwargs):
name = kwargs.pop('name', None) or lopt.__name__
compile.mode.local_useless.register(name, lopt, 'last', 'fast_run',
*tags, **kwargs)
return lopt
return lopt
compile.optdb.register('useless', TopoOptimizer(local_useless, order="in_to_out"), 0.6, 'fast_run', 'fast_compile')
def register_canonicalize(lopt, *tags, **kwargs):
if type(lopt) == str:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论