PyTorch version: 1.9.0+cu102
NVIDIA GeForce RTX 2080 Ti
CUDA Version 10.1.105
I’ve found something interesting. If I’m adding:

torch.backends.cudnn.deterministic = True

It solves the issue.
But when running with:

cudnn.benchmark = True

It’s bringing back the problem (even torch.backends.cudnn.deterministic = True).