Error with GPU0 Tesla K20m with cuda capability 3.5 and pytorch

Unfortunately this is expected with later binary releases as support for compute capability 3.5 has been dropped. You could try building from source (e.g., as described here [SOLVED] PyTorch no longer supports this GPU because it is too old) or try installing older binaries that would support compute capability 3.5: Previous PyTorch Versions | PyTorch.