Vector Institute interview question

How does Pytorch compute gradients?