提交 41b10b4a authored 作者: Frederic's avatar Frederic

Remove useless user warning.

上级 56c115bb
...@@ -648,6 +648,10 @@ def local_gpu_careduce(node): ...@@ -648,6 +648,10 @@ def local_gpu_careduce(node):
if isinstance(node.op.scalar_op, (scal.Add, scal.Mul, if isinstance(node.op.scalar_op, (scal.Add, scal.Mul,
scal.Maximum, scal.Minimum)): scal.Maximum, scal.Minimum)):
x, = node.inputs x, = node.inputs
# Otherwise, is some corner case, we will try to move it
# to the GPU later and this cause not wanted user warning.
if x.dtype != 'float32':
return
replace = False replace = False
if x.owner and isinstance(x.owner.op, HostFromGpu): if x.owner and isinstance(x.owner.op, HostFromGpu):
replace = True replace = True
...@@ -665,7 +669,7 @@ def local_gpu_careduce(node): ...@@ -665,7 +669,7 @@ def local_gpu_careduce(node):
# don't introduce a bigger transfer. It is hard to # don't introduce a bigger transfer. It is hard to
# know if after all optimization we will do the bigger # know if after all optimization we will do the bigger
# transfer or not. I'm guessing an heuristic to find # transfer or not. I'm guessing an heuristic to find
# that. I suppose that if the input of the recution is # that. I suppose that if the input of the reduction is
# generated by an op that we can in some cases move to # generated by an op that we can in some cases move to
# the GPU, that we will move it. If some CPU ops are # the GPU, that we will move it. If some CPU ops are
# supported only in some cases on the GPU, this will # supported only in some cases on the GPU, this will
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论