Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 ``` Differential Revision: D44075910 fbshipit-source-id: abe0295fc1f2e448961ce7a0040dcd94a7744bc2
- Loading branch information