If you cannot use PyTorch methods and would need to use numpy functions, then you would need to implement the backward manually.
However, if all needed operations can be called in PyTorch, the backward pass will just work.