In the cpu implementation we have, they are actually ignored. here 4 is the implementation. But possibly, the cuda code does something different.
Could you open an issue on github stating that in the best case the doc is incorrect and in the worst case our implementations across devices are not consistent.
A simple repro to put there:
import torch
inp = -torch.ones(2, 4, 7, 7)

print(torch.nn.MaxPool2d(5, padding=2)(inp))