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

better error message.

上级 463dad0c
...@@ -1811,9 +1811,10 @@ CudaNdarray_inplace_elemwise(PyObject* py_self, PyObject * py_other, operator_t ...@@ -1811,9 +1811,10 @@ CudaNdarray_inplace_elemwise(PyObject* py_self, PyObject * py_other, operator_t
{ {
PyErr_Format( PyErr_Format(
PyExc_RuntimeError, PyExc_RuntimeError,
"Cuda error: %s: %s.\n", "Cuda error: %s: %s. n_block=(%ld,%ld) n_threads=%ld\n",
"k4", "k5 with loop over k4",
cudaGetErrorString(err)); cudaGetErrorString(err),
(long) n_blocks.x, (long) n_blocks.y, (long) n_threads.x);
Py_XDECREF(new_other); Py_XDECREF(new_other);
return -1; return -1;
} }
...@@ -1837,8 +1838,8 @@ CudaNdarray_inplace_elemwise(PyObject* py_self, PyObject * py_other, operator_t ...@@ -1837,8 +1838,8 @@ CudaNdarray_inplace_elemwise(PyObject* py_self, PyObject * py_other, operator_t
std::min( std::min(
CudaNdarray_HOST_DIMS(self)[3], CudaNdarray_HOST_DIMS(self)[3],
NUM_VECTOR_OP_THREADS_PER_BLOCK) NUM_VECTOR_OP_THREADS_PER_BLOCK)
//TODO: DON"T YOU NEED OT PUT DIMS[4] in here??? //TODO: DON'T YOU NEED TO PUT DIMS[4] in here???
//TODO: DON"T YOU NEED OT PUT DIMS[5] in here??? //TODO: DON'T YOU NEED TO PUT DIMS[5] in here???
); );
k6<<<n_blocks, n_threads>>>( k6<<<n_blocks, n_threads>>>(
CudaNdarray_HOST_DIMS(self)[0], CudaNdarray_HOST_DIMS(self)[0],
...@@ -1867,9 +1868,11 @@ CudaNdarray_inplace_elemwise(PyObject* py_self, PyObject * py_other, operator_t ...@@ -1867,9 +1868,11 @@ CudaNdarray_inplace_elemwise(PyObject* py_self, PyObject * py_other, operator_t
{ {
PyErr_Format( PyErr_Format(
PyExc_RuntimeError, PyExc_RuntimeError,
"Cuda error: %s: %s.\n", "Cuda error: %s: %s. n_blocks=(%ld, %ld, %ld) n_threads=(%ld)\n",
"k4", "k6",
cudaGetErrorString(err)); cudaGetErrorString(err),
(long) n_blocks.x, (long) n_blocks.y, (long) n_blocks.z,
(long) n_threads.x);
Py_XDECREF(new_other); Py_XDECREF(new_other);
return -1; return -1;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论