Port `all` kernel to structured kernels. (#60360)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60360
Tracking issue: #55070
This PR was openned so as to solve the CI failures in main when merging: #59371 #59372 #59373 #59937 #59938.
Test Plan: Imported from OSS
Reviewed By: albanD
Differential Revision: D29265856
Pulled By: ezyang
fbshipit-source-id: 6e9b45ad3fc3852bb142ae2e3d58fc5d0a911aed