提交 c45ca839 authored 作者: Frederic's avatar Frederic

small opt in tests.

上级 30131c73
...@@ -1316,11 +1316,11 @@ def local_gpualloc(node): ...@@ -1316,11 +1316,11 @@ def local_gpualloc(node):
if node.inputs[0].owner and \ if node.inputs[0].owner and \
node.inputs[0].owner.op == host_from_gpu: node.inputs[0].owner.op == host_from_gpu:
replace = True replace = True
if all([c != 'output' and c.op == gpu_from_host elif all([c != 'output' and c.op == gpu_from_host
for c, idx in node.outputs[0].clients]): for c, idx in node.outputs[0].clients]):
# if all clients are on gpu # if all clients are on gpu
replace = True replace = True
if all([c != 'output' and elif all([c != 'output' and
c.op == tensor.join and c.op == tensor.join and
all([i.owner and all([i.owner and
i.owner.op in [host_from_gpu, tensor.alloc] i.owner.op in [host_from_gpu, tensor.alloc]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论