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

Fail fast when dynamo attempts to add unspecialized int/float as additional graph inputs #96786

Closed
wants to merge 1 commit into from

Commits on Mar 17, 2023

  1. Fail fast when dynamo attempts to add unspecialized int/float as addi…

    …tional graph inputs (pytorch#96786)
    
    Summary:
    Pull Request resolved: pytorch#96786
    
    Verified the changes to catch unspecialized int/floats being added as additional graph in D44037548 prior to RP(pytorch#95621).
    
    However, with pytorch#95621 the issue to be solved originally is no longer valid because int & float in `forward` will always be specialized in export. This RP is to add the assertion anyway *(though not be hit unless there is a regression)* to immediately catch the attempt to add unspecialized int/float to additional graphargs
    
    Test Plan:
    Example of the error message would look like:
    ```
    Dynamo attempts to add additional input: value=9.999999747378752e-06, source=NNModuleSource(inner=AttrSource(base=NNModuleSource(inner=AttrSource(base=LocalInputSource(local_name='self', pos=0), member='torch_module')), member='eps'))
    ```
    Passed all export tests
    ```
    Buck UI: https://www.internalfb.com/buck2/fea72653-5549-47e7-a9bf-740eb86a8e26
    Test UI: https://www.internalfb.com/intern/testinfra/testrun/8725724422167257
    RE: reSessionID-7b3470b1-c293-4c4a-9671-dd0b7a2839b8  Up: 6.0 KiB  Down: 0 B
    Jobs completed: 101. Time elapsed: 115.7s.
    Tests finished: Pass 98. Fail 0. Fatal 0. Skip 0. 0 builds failed
    ```
    
    Reviewed By: tugsbayasgalan
    
    Differential Revision: D44075910
    
    fbshipit-source-id: b7a0920eca34f25e5a5183242278219dbe5761eb
    guangy10 authored and facebook-github-bot committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    d9ebc99 View commit details
    Browse the repository at this point in the history