Reland 2 Many symintifications (#87604) (#87980)

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/87980
Approved by: https://github.com/ezyang
This commit is contained in:
albanD
2022-10-28 13:40:11 +00:00
committed by PyTorch MergeBot
parent ce3e0e9856
commit 8a9aca7b8d
29 changed files with 197 additions and 154 deletions

View File

@ -719,7 +719,9 @@ def argument(a: Argument) -> PythonArgument:
name=a.name,
type=a.type,
# TODO: directly translate a.default to python default
default=str(pythonify_default(cpp.default_expr(a.default, a.type)))
default=str(
pythonify_default(cpp.default_expr(a.default, a.type, symint=False))
)
if a.default is not None
else None,
default_init=None,
@ -804,7 +806,7 @@ def signature_from_schema(
a = getattr(topt_args, name)
if a.default is None or a.default == "None":
return None
return cpp.default_expr(a.default, a.type)
return cpp.default_expr(a.default, a.type, symint=False)
tensor_options_args.append(
PythonArgument(