升级pytorch v1.11.0

This commit is contained in:
xiaxia3
2022-08-11 21:52:29 +08:00
parent eeb8ca89cc
commit df1a2e030f
655 changed files with 12958 additions and 51397 deletions
+3 -5
View File
@@ -58,12 +58,10 @@ def name(func: FunctionSchema, *, faithful_name_for_out_overloads: bool = False)
# types. Returns None if the type in question is not a value type.
def valuetype_type(t: Type, *, binds: ArgName) -> Optional[NamedCType]:
if isinstance(t, BaseType):
if t.name == BaseTy.Tensor:
if t.name == BaseTy.Tensor or t.name == BaseTy.Scalar:
return None
elif t.name in BaseTypeToCppMapping:
return NamedCType(binds, BaseCType(BaseTypeToCppMapping[t.name]))
else:
raise AssertionError(f"unsupported type {repr(t)}")
# All other BaseType currently map directly to BaseCppTypes.
return NamedCType(binds, BaseCType(BaseTypeToCppMapping[t.name]))
elif isinstance(t, OptionalType):
elem = valuetype_type(t.elem, binds=binds)
if elem is None: