What is x in your example? Is it the input of the model?
Let’s say x your input (with requires_grad=True) and the first layer of the model in a Linear with no bias, parameters w, doing y = w*x.
The last step of the backprop would be dL/dx = dy/dx * dL/dy
and dy/dx = w, no matter what is the value of x.