Example:
import torch
from torch.testing._internal.two_tensor import TwoTensor
@torch.compile(backend="aot_eager", dynamic=False)
def f(x):
if x.shape[0] > 5:
return x + 1
else:
return x + 2
x_inner = torch.ones(4)
x = TwoTensor(x_inner, x_inner)
x_view = x.view(2, 2)
out = f(x_view)
Running with TORCH_LOGS="+dynamic", you can see a lot of symint compute going on. If you put a breakpoint here, the returned FakeTensor has SymInts for its sizes, even though we compiled with dynamic=False
cc @eellison