this 53 says it is implemented as SpatialDilatedMaxPooling. You can find the code for that here 166 and here 65
I’m not sure what your use case is but if it’s simple you can just perform operations to the output of max_pool2d, not worry about implementing a backward, and autograd will take care of it.