提交 b67bb9e0 authored 作者: Frederic's avatar Frederic

better error message.

上级 b467c97f
...@@ -760,9 +760,11 @@ class GpuCAReduce(HideC, CAReduce): ...@@ -760,9 +760,11 @@ class GpuCAReduce(HideC, CAReduce):
zero_shp = "cudaMemset((float *)(((char *)cuda_get_ptr(%(z)s->ga.data))+%(z)s->ga.offset), 0, PyGpuArray_SIZE(%(z)s) * sizeof(float))" % locals() zero_shp = "cudaMemset((float *)(((char *)cuda_get_ptr(%(z)s->ga.data))+%(z)s->ga.offset), 0, PyGpuArray_SIZE(%(z)s) * sizeof(float))" % locals()
#TODO: elif getattr(self.scalar_op, 'identity', None) == 1: #TODO: elif getattr(self.scalar_op, 'identity', None) == 1:
else: else:
scalar_op = self.scalar_op
zero_shp = """ zero_shp = """
PyErr_Format(PyExc_NotImplementedError, PyErr_Format(PyExc_NotImplementedError,
"GpuCAReduce not implemented when input shape is 0 for this scalar_op"); "GpuCAReduce not implemented when input shape is 0"
" for this scalar_op: %(scalar_op)s");
%(fail)s; %(fail)s;
""" % locals() """ % locals()
print >> sio, """ print >> sio, """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论