It seems like both functions can be used to compute gradient. In fact, in their source code they call the same function_execution_engine.run_backward().
So what is the difference of these functions in terms of use cases? I would assume autograd.grad is more general?