Skip to content

Commit 6d161ab

Browse files
authored
fix(autogram): Add automatic vmap rule to JacobianAccumulator (#413)
1 parent 1684cbd commit 6d161ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/torchjd/autogram/_module_hook_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ class JacobianAccumulator(torch.autograd.Function):
108108
toggle mechanism to activate only during the Gramian accumulation phase.
109109
"""
110110

111+
generate_vmap_rule = True
112+
111113
@staticmethod
112114
def forward(*xs: Tensor) -> tuple[Tensor, ...]:
113115
return tuple([x.detach() for x in xs])

0 commit comments

Comments
 (0)