Revert "Use universal flatten APIs (#152505)"
Summary:
This reverts commit f9e3a9058e80fde310e5f0919d3a21e28cd024a8.
Reverted https://github.com/pytorch/pytorch/pull/152505 on behalf of https://github.com/jeanschmidt due to [TENTATIVE] reverting to check if reverting this stack partially caused the introduction of https://github.com/pytorch/pytorch/actions/runs/14966121510/job/42049638969#step:22:875 ([comment](https://github.com/pytorch/pytorch/pull/152505#issuecomment-2872869990))
Reviewed By: jeanschmidt
Differential Revision: D74584969
fbshipit-source-id: 0615efe81e28ab3f1a67103648f5f9adcab44dae
Author
generatedunixname499836121