-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
module: dynamic shapesoncall: pt2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Describe the bug
import torch
torch._dynamo.config.capture_scalar_outputs = True
@torch.compile(fullgraph=True)
def f(x):
u0, u1 = x.tolist()
torch._check_is_size(u0)
if ((u0 + 10) * (u0 + 10)) % (u0 + 10) != 0:
return torch.tensor(True)
else:
return torch.tensor(False)
f(torch.tensor([20, 21]))
A simple fix might be to avoid expanding at which point the divisibility is obvious. IDK.
cc @chauhang @penguinwu @isuruf
Versions
main
Metadata
Metadata
Assignees
Labels
module: dynamic shapesoncall: pt2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module