提交 dc458e24 authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix crash opt warning in corner case.

上级 ea927aef
...@@ -560,7 +560,8 @@ def local_gpu_lazy_ifelse(node): ...@@ -560,7 +560,8 @@ def local_gpu_lazy_ifelse(node):
# Should not happen, but just in case # Should not happen, but just in case
if isinstance(c.type, CudaNdarrayType): if isinstance(c.type, CudaNdarrayType):
c = host_from_gpu(c) c = host_from_gpu(c)
if all([isinstance(o.type, CudaNdarrayType) or o.dtype != 'float32' if all([isinstance(o.type, CudaNdarrayType) or
getattr(o, 'dtype', None) != 'float32'
for o in outs]): for o in outs]):
return return
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论