Skip to content

Commit

Permalink
fix compilation for torch v2.2.1 (#124)
Browse files Browse the repository at this point in the history
Mark cudagraph begin in compilation.
Fixes #123
  • Loading branch information
Phil26AT authored Apr 16, 2024
1 parent 075ae42 commit edb2b83
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lightglue/lightglue.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ def compile(
stacklevel=2,
)

torch._inductor.cudagraph_mark_step_begin()
for i in range(self.conf.n_layers):
self.transformers[i].masked_forward = torch.compile(
self.transformers[i].masked_forward, mode=mode, fullgraph=True
Expand Down

0 comments on commit edb2b83

Please sign in to comment.