提交 d1d9a849 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

Make the inplace optmization work only with cpu scan

I've added another version of the optimization for gpu scans.
上级 875d0364
...@@ -289,7 +289,8 @@ optdb.register('scanOp_pushout_nonseqs_ops', ...@@ -289,7 +289,8 @@ optdb.register('scanOp_pushout_nonseqs_ops',
def scan_make_inplace(node): def scan_make_inplace(node):
op = node.op op = node.op
if ( isinstance(op, scan_op.Scan) and if ( isinstance(op, scan_op.Scan) and
(not op.info['inplace']) ): (not op.info['inplace']) and
(not op.info['gpu'])):
info = op.info.copy() info = op.info.copy()
info['inplace'] = True info['inplace'] = True
# inputs corresponding to sequences and n_steps # inputs corresponding to sequences and n_steps
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论