Using meta checks for unary `torch.all` and `torch.any`. (#59373)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59373
This PR makes use of the newly implemented unified `at::meta::check_reduction` for
validating the inputs and configuring its `TensorIterator`.
Test Plan: Imported from OSS
Reviewed By: soulitzer
Differential Revision: D29104398
Pulled By: ezyang
fbshipit-source-id: 6771b80130c91c2f1360853127de0acebcfff183