[Dynamo] Add complex to literal constant (#117819)

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/117819
Approved by: https://github.com/zou3519
This commit is contained in:
Yanbo Liang
2024-01-23 23:46:44 +00:00
committed by PyTorch MergeBot
parent cd084c4909
commit c0732c8d5e
6 changed files with 18 additions and 21 deletions

View File

@ -1331,7 +1331,6 @@ class TestBinaryUfuncs(TestCase):
self.assertEqual(res1, res2)
self.assertEqual(res1.dtype, expected_dtype)
@skipIfTorchDynamo("ConstantVariable(list) is banned")
@dtypes(*all_types_and_complex_and(torch.half, torch.bfloat16))
def test_pow(self, device, dtype):
m1 = torch.empty(0, dtype=dtype, device=device)
@ -3982,7 +3981,6 @@ class TestBinaryUfuncs(TestCase):
doubles, sz, lambda input, out: torch.pow(42, input, out=out)
)
@skipIfTorchDynamo("ConstantVariable(list) is banned")
@dtypes(
*list(
product(
@ -4090,7 +4088,6 @@ class TestBinaryUfuncs(TestCase):
torch.float_power(i, exp, out=out)
self.assertEqual(expected_scalar_base, out)
@skipIfTorchDynamo("ConstantVariable(list) is banned")
def test_float_power_exceptions(self, device):
def _promo_helper(x, y):
for i in (x, y):