提交 57496c6c authored 作者: Frederic's avatar Frederic

Fix GpuAdvSub1 verbose and error message.

上级 3c1d5bc0
...@@ -1002,7 +1002,7 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){ ...@@ -1002,7 +1002,7 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){
return NULL; return NULL;
indices = (CudaNdarray*) CudaNdarray_New(); indices = (CudaNdarray*) CudaNdarray_New();
if (verbose) printf("ndarray after new\n"); if (verbose) printf("\nndarray after new\n");
if (! indices){ if (! indices){
Py_DECREF(indices_float32); Py_DECREF(indices_float32);
return NULL; return NULL;
...@@ -1149,7 +1149,7 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){ ...@@ -1149,7 +1149,7 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){
printf("cudaGetLastError=%d, nd=%d" printf("cudaGetLastError=%d, nd=%d"
" kernel config: (n_blocks.x=%d, n_blocks.y=%d," " kernel config: (n_blocks.x=%d, n_blocks.y=%d,"
" n_threads.x=%i, n_threads.y=%i)\n", " n_threads.x=%i, n_threads.y=%i)\n",
self->nd, cudaGetLastError(), cudaGetLastError(), self->nd,
n_blocks.x, n_blocks.y, n_threads.x, n_threads.y); n_blocks.x, n_blocks.y, n_threads.x, n_threads.y);
k3<<<n_blocks, n_threads>>>( k3<<<n_blocks, n_threads>>>(
dims[0], dims[0],
...@@ -1205,7 +1205,7 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){ ...@@ -1205,7 +1205,7 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){
printf("cudaGetLastError=%d, nd=%d" printf("cudaGetLastError=%d, nd=%d"
" kernel config: (n_blocks.x=%d, n_blocks.y=%d," " kernel config: (n_blocks.x=%d, n_blocks.y=%d,"
" n_threads.x=%i, n_threads.y=%i)\n", " n_threads.x=%i, n_threads.y=%i)\n",
self->nd, cudaGetLastError(), cudaGetLastError(), self->nd,
n_blocks.x, n_blocks.y, n_threads.x, n_threads.y); n_blocks.x, n_blocks.y, n_threads.x, n_threads.y);
k3<<<n_blocks, n_threads>>>( k3<<<n_blocks, n_threads>>>(
dims[0], //dimensions dims[0], //dimensions
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论