提交 aaab570f authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix registration of new opt

上级 b9b10ced
......@@ -2547,7 +2547,7 @@ def local_gpu_alloc_empty_to_zeros(node):
return [gpu_alloc(theano.tensor.constant(0, dtype='float32'),
*node.inputs)]
optdb.register('local_gpu_alloc_empty_to_zeros',
local_gpu_alloc_empty_to_zeros,
theano.tensor.opt.in2out(local_gpu_alloc_empty_to_zeros),
# After move to gpu and merge2, before inplace.
49.3,
'alloc_empty_to_zeros',)
......
......@@ -307,7 +307,7 @@ def local_gpua_alloc_empty_to_zeros(node):
return [GpuAlloc()(theano.tensor.constant(0, dtype='float32'),
*node.inputs)]
optdb.register('local_gpua_alloc_empty_to_zeros',
local_gpua_alloc_empty_to_zeros,
theano.tensor.opt.in2out(local_gpua_alloc_empty_to_zeros),
# After move to gpu and merge2, before inplace.
49.3,
'alloc_empty_to_zeros',)
......
......@@ -1780,7 +1780,7 @@ def local_alloc_empty_to_zeros(node):
if isinstance(node.op, T.AllocEmpty):
return [T.zeros(node.inputs, dtype=node.outputs[0].dtype)]
compile.optdb.register('local_alloc_empty_to_zeros',
local_alloc_empty_to_zeros,
in2out(local_alloc_empty_to_zeros),
# After move to gpu and merge2, before inplace.
49.3,
'alloc_empty_to_zeros',)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论