PyTorch for Tesla k40c with cuda 11.2

You could build PyTorch from source for the compute capability 3.5 as described here.