It will do backward propagation. If you are using pytorch 0.4.0, you can check it like this:
## x in range [0, 1]
x = torch.rand(3,2,requires_grad=True)
loss = torch.sum(torch.abs(x))
loss.backward()
## gradient should be all one
x.grad