mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-29 03:04:55 +08:00
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/87980 Approved by: https://github.com/ezyang
This commit is contained in:
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user