@albanD the latter one, which nn.Module has a hook associated with it. or even in a more general case which nn.Module or tensor has a hook attach to it.
Not sure why you mention the former case, but just out of curiosity, would it even make scenes or have any usage to know what line of code calls “register_*_hook()”?