Just to share my case, I had a similar error code.
I commented the line cudnn.benchnark=True and everything works fine now.
Training code works fine with the commented line, but when I run my validation code, it crashes with the same 77 illegal access error.
Anyways, I will share more if I find something else.