I get the same outputs using the definition from the docs 10:
pred = torch.tensor([[0.2, 0.8]])
target = torch.tensor([[0.1, 0.9]])
F.kl_div(pred, target, reduction='sum', log_target=False)
> tensor(-1.0651)
torch.sum(target * (torch.log(target) - pred))
> tensor(-1.0651)

F.kl_div(pred, target, reduction='sum', log_target=True)
> tensor(0.1354)
torch.sum(torch.exp(target) * (target - pred))
> tensor(0.1354)