import torch
from torch.nn.functional import smooth_l1_loss, l1_loss
y_pred=torch.tensor(1.0)
y_true=torch.tensor(1.12)

loss1=smooth_l1_loss(y_pred, y_true, 1e-2, reduction = 'sum')
loss2=smooth_l1_loss(y_pred, y_true, 0, reduction = 'sum')
loss3=l1_loss(y_pred, y_true, reduction = 'sum')
print((y_pred-y_true).abs().item(), loss1.item(), loss2.item(), loss3.item())

Output is
0.12000000476837158
0.007200000341981649
0.007200000341981649
0.12000000476837158
weird