How to update a non-differentiable parameter in a custom backward pass?

I’d like to update a non-differentiable parameter, which is given as a function of variables that appear in backward(), in a custom backward pass. What can I do?

This may be a silly question, but if I multiply a parameter X with an intermediate variable in forward() that requires a custom backward() (since other ops in forward() require custom backward() and cannot be separated), do I still have to manually specify grad_X in backward(), though such operation as multiplication usually doesn’t require its gradient to be specified in backward()?