This reverts commit a9f6a35a33. Reverted https://github.com/pytorch/pytorch/pull/78473 on behalf of https://github.com/malfet due to Seems to broke Mac tests, see a9f6a35a33
a9f6a35a33