These errors are most likely due to the limited floating point precision:
torch.manual_seed(2809)

x = torch.randn(100, 100, 100)
y = torch.randn(100, 100, 100)

x_sum1 = x.sum(0).sum(0).sum(0)
x_sum2 = x.sum(2).sum(1).sum(0)
y_sum1 = y.sum(0).sum(0).sum(0)
y_sum2 = y.sum(2).sum(1).sum(0)

res1 = x_sum1 * y_sum1
res2 = x_sum2 * y_sum2 

print(x_sum1-x_sum2)
> tensor(-0.0002)
print(y_sum1-y_sum2)
> tensor(-0.0006)
print(res1-res2)
tensor(0.6250)

If you need more precision, you could use .double() precision.