提交 2cfc5e09 authored 作者: Frederic Bastien's avatar Frederic Bastien

Don't push other dtype then float32 on the gpu. This remove false output in the buildbot.

上级 401c2a4c
...@@ -518,7 +518,7 @@ def local_gpu_subtensor(node): ...@@ -518,7 +518,7 @@ def local_gpu_subtensor(node):
if isinstance(node.op, tensor.Subtensor): if isinstance(node.op, tensor.Subtensor):
x = node.inputs[0] x = node.inputs[0]
coords = node.inputs[1:] coords = node.inputs[1:]
if x.owner and x.owner.op == host_from_gpu: if x.owner and x.owner.op == host_from_gpu and x.dtype == "float32":
gpu_x, = x.owner.inputs gpu_x, = x.owner.inputs
return [host_from_gpu(GpuSubtensor(node.op.idx_list)(gpu_x, *coords))] return [host_from_gpu(GpuSubtensor(node.op.idx_list)(gpu_x, *coords))]
return False return False
...@@ -535,7 +535,7 @@ def local_gpu_advanced_subtensor1(node): ...@@ -535,7 +535,7 @@ def local_gpu_advanced_subtensor1(node):
if node.op.__class__ is tensor.AdvancedSubtensor1: if node.op.__class__ is tensor.AdvancedSubtensor1:
x = node.inputs[0] x = node.inputs[0]
coords = node.inputs[1:] coords = node.inputs[1:]
if x.owner and x.owner.op == host_from_gpu: if x.owner and x.owner.op == host_from_gpu and x.dtype == "float32":
gpu_x, = x.owner.inputs gpu_x, = x.owner.inputs
return [host_from_gpu(GpuAdvancedSubtensor1()(gpu_x, *coords))] return [host_from_gpu(GpuAdvancedSubtensor1()(gpu_x, *coords))]
return False return False
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论