For my case, I am implementing gradient clipping as the grad is calculated. I have a print statement before the call to register_hook() and it is indeed being called. The code is as follows and was adapted from @tom’s  tutorial.
def forward(self, x):        
    r_out, hidden = self.lstm(x, None)
        
    h = hidden[0]
    if h.requires_grad:
        h.register_hook(lambda x: x.clamp(min=-10, max=10))

Any tips on how to debug this further?