8000 eval should handle (unhinted: (s77 > 3) | (u0 > 200)) when s77 has hint =5 · Issue #153227 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

eval should handle (unhinted: (s77 > 3) | (u0 > 200)) when s77 has hint =5 #153227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
laithsakka opened this issue May 9, 2025 · 1 comment
Labels
module: dynamic shapes oncall: pt2 triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@laithsakka
Copy link
Contributor
laithsakka commented May 9, 2025
torch._dynamo.config.capture_scalar_outputs = True
@torch.compile(dynamic=True, fullgraph=True)
def func(x,y):
        if sym_or(x.size()[0]>3, y.item()>200):
                return x*100
        else:
                return x*200

func(torch.tensor([1,2,3,4,5]), torch.tensor([1]))

cc @chauhang @penguinwu @ezyang @bobrenjc93 @pianpwk

notes:

  1. this work
torch._dynamo.config.capture_scalar_outputs = True
@torch.compile(dynamic=True, fullgraph=True)
def func(x,y):
        d = x.size()[0]>3 or y.item()>200
        if d:
                return x*100
        else:
                return x*200

func(torch.tensor([1,2,3,4,5]), torch.tensor([1]))
  1. this also does not work.

torch._dynamo.config.capture_scalar_outputs = True
@torch.compile(dynamic=True, fullgraph=True)
def func(x,y):
        d = sym_or(x.size()[0]>3 , y.item()>200)
        if d:
                return x*100
        else:
                return x*200

func(torch.tensor([1,2,3,4,5]), torch.tensor([1]))
@laithsakka laithsakka changed the title eval should handle (unhinted: (s77 > 100) | (u0 > 200)) when s77 has hint =5 eval should handle (unhinted: (s77 > 3) | (u0 > 200)) when s77 has hint =5 May 9, 2025
@masnesral masnesral added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 12, 2025
@bobrenjc93
Copy link
Contributor

@laithsakka I'm confused by this issue

  1. Can you include the output of how it's not working
  2. You say 1, "works" but 2 "also does not work". does that mean you typo'd 1 and meant to say 1 doesn't work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: dynamic shapes oncall: pt2 triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants
0