You can use torch.svd() and find the largest singular value (it automatically sorts the singular values).
However, this would be quite inefficient, because unfortunately pytorch does not currently support top-1 eigenvalue decomposition. See my recent question here.