Could you try to lower the size of your input to avoid the OOM issue and see if the code runs fine without cuDNN enabled?
Also, is your code running on CPU? The error messages might be a bit clearer if thrown from a CPU run.