You could enable cudnn API logging 2, rerun the script, and post the output here, so that I could debug the issue and see, if cudnn is creating the crash or if maybe another sticky error is just caught by cudnn.
Also, if possible, rerun the script via CUDA_LAUNCH_BLOCKING=1 python script.py args, which should point to the line of code, which causes the error.