cudnnActivationBackward CUDNN_STATUS_BAD_PARAM

Hi,
I am working on my deep learning using cuDNN.

When I call an in-place cudnnActivationBackward() in a separate program it works, but calling it in my framework gives me status bad param error; it’s clear that I’m doing something wrong but I can’t tell what it is.

cudnnStatus_t status = cudnnActivationBackward(
cudnn_handle, 
activation_desc, 
alpha_conv_, 
output_tensor_desc, 
layer_output_block->getData(), 
output_tensor_desc, 
delta_block->getData(), 
output_tensor_desc, 
layer_output_block->getData(), 
beta, 
output_tensor_desc, 
delta_block->getData());

operation is in-place so
x == y == layer_output_block->getData()
dx == dy == delta_block->getData()
tensor descriptor is NCHW=5x5x9x9

activation_desc is created with RELU activation, non propating NAN.
output_tensor_desc is the same all over the parameters, so NCHW matches for all x,y,dx,dy.

But I get CUDNN_STATUS_BAD_PARAM.
I’ve read the cuDNN guide which says that CUDNN_STATUS_BAD_PARAM is returned when : The strides nStride, cStride, hStride, wStride of the input differential tensor and output differential tensors differ and in-place operation is used.
Since I pass the parameters dx == dy, x == y and the same tensor descriptor, I don’t think I break the rules (and since in my separate program it works, I guess the way I pass params is correct).

So, there are other cases for which I could get CUDNN_STATUS_BAD_PARAM and are not mentioned in the cuDNN guide ? It is very annoying to get a single return code for a lot of reasons; it would be much easier to debug if I receive CUDNN_STATUS_BAD_PARAM_reason_bla or CUDNN_STATUS_BAD_PARAM_reason_blabla or CUDNN_STATUS_BAD_PARAM_reason_other_bla.

I use CUDA 7.5, cuDNN 5.1.3, on Titan X Maxwell.

Thanks,
Viorel

Never mind, I found the problem:
I did

beta = 0;

instead of

*beta = 0;

so I made the pointer to beta NULL and that’s a bad param of course.
It would had been much easier and faster to receive CUDNN_STATUS_BAD_PARAM_BETA_NULL, and that’s self explanatory.

Cheers,
Viorel