Revert "Enable `dim=None` for `torch.sum` (#75845)"
This reverts commit e79a51f7db181be2e6e196d6d9d90403022bc465.
Reverted https://github.com/pytorch/pytorch/pull/75845 on behalf of https://github.com/malfet due to Breaks MacOS builds, see https://hud.pytorch.org/pytorch/pytorch/commit/e79a51f7db181be2e6e196d6d9d90403022bc465