torch.manual_seed(0)
W = torch.FloatTensor(10, 5000).normal_(0,1)

print(W.norm(2) ** 2, W.sum())
W = W.cuda()

print(W.norm(2) ** 2, W.sum())

W = W.cpu()
print(W.norm(2) ** 2, W.sum())

When I run this code, the results is
tensor(97479.4609) tensor(-358.1119)
tensor(50004.2148, device='cuda:0') tensor(-358.1118, device='cuda:0')
tensor(97479.4609) tensor(-358.1119)

The results of norm is significantly different, but the results of sum is almost the same.
When I change the size of tensor W from (10,5000) to (10,1000). I get the results:
tensor(10038.8496) tensor(-106.9817)
tensor(10038.8516, device='cuda:0') tensor(-106.9818, device='cuda:0')
tensor(10038.8496) tensor(-106.9817)

The results of norm is almost the same.
I want to figure out how to explain these results?