Skip to content

Commit be37bd2

Browse files
authored
fix aten.var.correction test case with function wrapper (#6194)
1 parent bd2ec6f commit be37bd2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/test_core_aten_ops.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4576,28 +4576,28 @@ def test_aten_upsample_nearest2d_0(self):
45764576
run_export_and_compare(self, torch.ops.aten.upsample_nearest2d, args,
45774577
kwargs)
45784578

4579+
def correction_wrapper(self, input, correction):
4580+
return torch.ops.aten.var.correction(input, correction=correction)
4581+
45794582
def test_aten_var_correction_0(self):
45804583
args = (torch.randn((10, 10)).to(torch.float32),)
45814584
kwargs = dict()
45824585
run_export_and_compare(self, torch.ops.aten.var.correction, args, kwargs)
45834586

4584-
@unittest.skip
45854587
def test_aten_var_correction_1(self):
45864588
args = (torch.randn((10, 10)).to(torch.float16),)
45874589
kwargs = dict()
45884590
run_export_and_compare(self, torch.ops.aten.var.correction, args, kwargs)
45894591

4590-
@unittest.skip
45914592
def test_aten_var_correction_2(self):
4592-
args = (torch.randn((10, 10)).to(torch.float32),)
4593-
kwargs = dict(correction=0)
4594-
run_export_and_compare(self, torch.ops.aten.var.correction, args, kwargs)
4593+
args = (torch.randn((10, 10)).to(torch.float32), 0)
4594+
kwargs = dict()
4595+
run_export_and_compare(self, self.correction_wrapper, args, kwargs)
45954596

4596-
@unittest.skip
45974597
def test_aten_var_correction_3(self):
4598-
args = (torch.randn((10, 10)).to(torch.float16),)
4599-
kwargs = dict(correction=0)
4600-
run_export_and_compare(self, torch.ops.aten.var.correction, args, kwargs)
4598+
args = (torch.randn((10, 10)).to(torch.float16), 0)
4599+
kwargs = dict()
4600+
run_export_and_compare(self, self.correction_wrapper, args, kwargs)
46014601

46024602
def test_aten_view_0(self):
46034603
args = (

0 commit comments

Comments
 (0)