Skip to content

Commit

Permalink
Add compiler flags to help hint more to torch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Schweer committed Jan 17, 2025
1 parent 70634f1 commit c5f26fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pytensor/link/pytorch/linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ def conversion_func_register(*args, **kwargs):
def jit_compile(self, fn):
import torch

# two flags that tend to help our graphs
torch._dynamo.config.capture_func_transforms = True
torch._dynamo.config.capture_scalar_outputs = True

from pytensor.link.pytorch.dispatch import pytorch_typify

class wrapper:
Expand Down

0 comments on commit c5f26fd

Please sign in to comment.