Put symint overloads on a different name

Due to implicit conversion shenanigans, having both IntArrayRef
and SymIntArrayRef overloads makes {} ambiguous.  While we could
fix this by making a single unified type that accepts all the overloads
we want, an easier fix was to just push the SymIntArrayRef overload
to its own name.

Signed-off-by: Edward Z. Yang <ezyangfb.com>

Pull Request resolved: https://github.com/pytorch/pytorch/pull/79281

Approved by: https://github.com/suo
This commit is contained in:
Edward Z. Yang
2022-06-11 18:44:33 -07:00
committed by PyTorch MergeBot
parent f23685f008
commit 213a8fc992
8 changed files with 23 additions and 9 deletions

View File

@ -1225,6 +1225,10 @@ class FunctionSchema:
def is_functional_fn(self) -> bool:
return "functional" in self.name.overload_name
def is_symint_fn(self) -> bool:
# TODO: make this more robust
return "SymInt" in self.name.overload_name
def is_out_fn(self) -> bool:
# Note [is_out_fn]
#