[fix] `adaptive_{avg, max}_pool` variants : cuda & cpu (#88906)
Fixes #78868
#### TODO
- [x] add tests
- [x] adaptive_avg_pool2d
- [x] adaptive_avg_pool3d
- [x] adaptive_max_pool2d
- [x] fix adaptive_max_pool3d_cuda
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88906
Approved by: https://github.com/mruberry