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

fix crash in GpuSum with pattern 01, 011, 0111 when the tensor was too big.

上级 5f2822a8
...@@ -832,7 +832,7 @@ class GpuSum(Op): ...@@ -832,7 +832,7 @@ class GpuSum(Op):
NUM_VECTOR_OP_THREADS_PER_BLOCK)); NUM_VECTOR_OP_THREADS_PER_BLOCK));
%(threads_y)s %(threads_y)s
%(threads_z)s %(threads_z)s
dim3 n_blocks(CudaNdarray_HOST_DIMS(%(x)s)[0]); dim3 n_blocks(std::min(CudaNdarray_HOST_DIMS(%(x)s)[0],NUM_VECTOR_OP_BLOCKS));
%(makecall)s %(makecall)s
} }
""" %locals() """ %locals()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论