提交 95580db6 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Sync R_op with the old backend.

上级 ca609d9f
...@@ -92,10 +92,7 @@ class HostFromGpu(GpuOp): ...@@ -92,10 +92,7 @@ class HostFromGpu(GpuOp):
def R_op(self, inputs, eval_points): def R_op(self, inputs, eval_points):
ev, = eval_points ev, = eval_points
if isinstance(ev, tensor.TensorType): return self(ev)
return [gpu_from_host(ev)]
else:
return [ev]
def infer_shape(self, node, xshp): def infer_shape(self, node, xshp):
return xshp return xshp
...@@ -155,10 +152,7 @@ class GpuFromHost(GpuOp): ...@@ -155,10 +152,7 @@ class GpuFromHost(GpuOp):
def R_op(self, inputs, eval_points): def R_op(self, inputs, eval_points):
ev, = eval_points ev, = eval_points
if isinstance(ev, CudaNdarrayType): self(ev)
return [host_from_gpu(ev)]
else:
return [ev]
def infer_shape(self, node, xshp): def infer_shape(self, node, xshp):
return xshp return xshp
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论