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

Added in2out to useless

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