How should i disable using cudnn in my code?

cuDNN should speed up the training time.
Also if you set torch.backends.cudnn.benchmark = True, cuDNN will use some heuristics at the beginning of your training to figure out which algorithm will be most performant for your model architecture and input.
This might be especially helpful, if your input shapes are fixed and not changing a lot during training.

2 Likes