Which PzTorch version are you using?
In the latest stable version (0.4.0), the operation returns a torch.FloatTensor:
a = torch.randn(1, 3, 6, 8)
p2d = (1, 1, 2, 2) # pad last dim by (1, 1) and 2nd to last by (2, 2)
b = F.pad(a, p2d, 'constant', 0)
print(b.type())