提交 837b1ca5 authored 作者: Frederic's avatar Frederic

Make a better error message and re-enable the compilation cache for GpuConvMM.

上级 4c8d04ff
...@@ -578,9 +578,8 @@ class GpuCorrMM(GpuOp): ...@@ -578,9 +578,8 @@ class GpuCorrMM(GpuOp):
return ['cuda_ndarray.cuh', '<stdio.h>'] return ['cuda_ndarray.cuh', '<stdio.h>']
def c_code_cache_version(self): def c_code_cache_version(self):
return
# raise this whenever modifying any of the support_code_files # raise this whenever modifying any of the support_code_files
return (0, 21) return (0, 22)
def c_support_code_apply(self, node, nodename): def c_support_code_apply(self, node, nodename):
# REMEMBER TO RAISE c_code_cache_version when changing any of # REMEMBER TO RAISE c_code_cache_version when changing any of
......
...@@ -132,8 +132,12 @@ CudaNdarray* corrMM(const CudaNdarray *input, ...@@ -132,8 +132,12 @@ CudaNdarray* corrMM(const CudaNdarray *input,
nOutputPlane != CudaNdarray_HOST_DIMS(output)[1] || nOutputPlane != CudaNdarray_HOST_DIMS(output)[1] ||
outputHeight != CudaNdarray_HOST_DIMS(output)[2] || outputHeight != CudaNdarray_HOST_DIMS(output)[2] ||
outputWidth != CudaNdarray_HOST_DIMS(output)[3]){ outputWidth != CudaNdarray_HOST_DIMS(output)[3]){
PyErr_SetString(PyExc_ValueError, PyErr_Format(
"GpuCorrMM outputs parameter don't have the good shape."); PyExc_ValueError,
"GpuCorrMM outputs parameter don't have the good shape %d %d %d %d, %d %d %d %d\n",
batchSize, nOutputPlane, outputHeight, outputWidth,
CudaNdarray_HOST_DIMS(output)[0], CudaNdarray_HOST_DIMS(output)[1],
CudaNdarray_HOST_DIMS(output)[2], CudaNdarray_HOST_DIMS(output)[3]);
return NULL; return NULL;
} }
// Create temporary columns // Create temporary columns
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论