Revert "Fixes for CPython int/float tests (#155978)"

This reverts commit fab53dfdf1d89cecd5e82b12cced9b6dd217e87c.

Reverted https://github.com/pytorch/pytorch/pull/155978 on behalf of https://github.com/guilhermeleobas due to failing in trunk ([comment](https://github.com/pytorch/pytorch/pull/155978#issuecomment-3019457531))
This commit is contained in:
PyTorch MergeBot
2025-06-30 14:49:44 +00:00
parent fab53dfdf1
commit da1f337bc4
78 changed files with 13 additions and 55 deletions

View File

@ -1277,12 +1277,6 @@ class BuiltinVariable(VariableTracker):
if isinstance(args[0], ConstantVariable):
return args[0].call_method(tx, name, args[1:], kwargs)
if self.fn is float and len(args) >= 1:
if isinstance(args[0], ConstantVariable):
return ConstantVariable.create(
getattr(float, name)(args[0].as_python_constant())
)
return super().call_method(tx, name, args, kwargs)
def _call_int_float(self, tx: "InstructionTranslator", arg):
@ -2068,6 +2062,7 @@ class BuiltinVariable(VariableTracker):
"assertNotWarns",
"assertWarnsRegex",
"assertDictEqual",
"assertSequenceEqual",
"assertWarns",
)
):