Skip to content
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

Refactor truncate_long_and_double in Dynamo #2590

Closed
gs-olive opened this issue Jan 12, 2024 · 1 comment
Closed

Refactor truncate_long_and_double in Dynamo #2590

gs-olive opened this issue Jan 12, 2024 · 1 comment
Assignees
Labels
component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths

Comments

@gs-olive
Copy link
Collaborator

  • Explicit considerations of truncation of inputs versus truncation of constants

Sourced from #2457 (comment):

  • Avoid running PyTorch graphs with invalid casts
  • Refactor repair_long_and_double to consume output of type inference
  • Reorder truncation to come as late as possible in the compilation process
@gs-olive gs-olive added the component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths label Jan 12, 2024
@gs-olive gs-olive self-assigned this Jan 12, 2024
@gs-olive
Copy link
Collaborator Author

Fix the following validator, which uses torch input types pre-truncation:

if val is not None and val.dtype != torch.int32:
return False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths
Projects
None yet
Development

No branches or pull requests

2 participants