[functorch] Added adaptive_max_poolNd batch rule (pytorch/functorch#263)
* Added adaptive_max_poolNd fw/bw batch rules
Description:
- Added adaptive_max_poolNd fw/bw batch rules
- Updated tests
Related to pytorch/functorch#240
Notes:
I created two additional macros to handle adaptive_max_pool2d and adaptive_max_pool3d_backward.
Not sure if we could make a generic rule to handle max_pool2d_with_indices_backward_batch_rule and adaptive_max_pool3d_backward,
as max_pool2d_with_indices_backward_batch_rule requires some args in the middle between gradOutput, input and indices.
* Replaced EXISTING_BDIM_MULTIOUT by EXISTING_BDIM_ALL_BOXED
* Removed specific implementations with indices.contiguous() for
- max_pool2d_with_indices_backward
- adaptive_max_pool2d_backward
- adaptive_max_pool3d_backward
and added ALL_TENSORS_HAVE_OPTIONAL_BDIM_BOXED_CONTIG1 to handle that