Fix some problems with cudnn R1.