提交 b7411329 authored 作者: Ziye Fan's avatar Ziye Fan

case for host_from_gpu added.

上级 7a1c7fcb
......@@ -34,10 +34,12 @@ _logger = logging.getLogger(_logger_name)
def as_cuda_ndarray_variable(x):
if x.owner and isinstance(x.owner.op, HostFromGpu):
return x.owner.inputs[0]
if \
x.owner is not None and \
x.owner and \
isinstance(x.owner.op, GpuFromHost) and \
hasattr(x.owner.inputs[0].owner, 'op') and \
x.owner.inputs[0].owner and \
isinstance(x.owner.inputs[0].owner.op, HostFromGpu):
return x.owner.inputs[0].owner.inputs[0]
if hasattr(x, '_as_CudaNdarrayVariable'):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论