Revert "Revert "Enabling SymInt in autograd; take 3 (#81145)"" ; make sure is_intlist checks for symintnodes (#82189)

### Description
<!-- What did you change and why was it needed? -->

### Issue
<!-- Link to Issue ticket or RFP -->

### Testing
<!-- How did you test your change? -->

Pull Request resolved: https://github.com/pytorch/pytorch/pull/82189
Approved by: https://github.com/ezyang
This commit is contained in:
Nikolay Korovaiko
2022-07-26 20:47:11 +00:00
committed by PyTorch MergeBot
parent 30e74be784
commit d2c47d559c
33 changed files with 373 additions and 64 deletions

View File

@ -1123,9 +1123,9 @@ def sort_overloads(
str(t1) == "Tensor[]"
and str(t2).find("[]") != -1
or
# Prioritize SymIntArrayRef overload over IntArrayRef
str(t1) == "int[]"
and str(t2) == "SymInt[]"
# Prioritize IntArrayRef overload over SymIntArrayRef
str(t1) == "SymInt[]"
and str(t2) == "int[]"
)
def is_smaller(s1: PythonSignature, s2: PythonSignature) -> bool: