Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sometimes one might want to impose equalities that are not required by guards, e.g. say that you only want square images when rectangular images would suffice. Curiously we never checked that the concrete values passed in example shapes actually satisfy such equality constraints. So, e.g., you could multiply two tensors of shapes MxK and KxN, specify that M and N must be equal, and then pass examples where they are not equal. Relatedly, the symbolic shape dimensions for inputs in the exported graph were not forced to be equal. However, runtime assertions still fire because they take into account all equality constraints. This would result in the strange situation where export would succeed but the exported program with the same example inputs would fail. This PR fixes these issues. Differential Revision: [D48910918](https://our.internmc.facebook.com/intern/diff/D48910918/) Pull Request resolved: pytorch#108429 Approved by: https://github.com/zhxchen17
- Loading branch information