提交 5ec01548 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Initialize wrong size buffer with default value

上级 c7103613
...@@ -1156,6 +1156,7 @@ def _get_preallocated_maps(node, thunk, prealloc_modes, def_val, ...@@ -1156,6 +1156,7 @@ def _get_preallocated_maps(node, thunk, prealloc_modes, def_val,
new_buf = numpy.zeros( new_buf = numpy.zeros(
shape=out_shape, shape=out_shape,
dtype=r.dtype) dtype=r.dtype)
new_buf += def_val
if isinstance(r.type, CudaNdarrayType): if isinstance(r.type, CudaNdarrayType):
new_buf = CudaNdarray(new_buf) new_buf = CudaNdarray(new_buf)
wrong_size[r] = new_buf wrong_size[r] = new_buf
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论