From dc1959e6a7843670331b978e0afbdff4e1b6dfd3 Mon Sep 17 00:00:00 2001 From: Xu Han Date: Sun, 25 Aug 2024 20:39:52 +0000 Subject: [PATCH] [inductor] calibration inductor windows uts (7/N) (#134420) Disable UTs on Windows: `test/dynamo/test_misc.py` Pull Request resolved: https://github.com/pytorch/pytorch/pull/134420 Approved by: https://github.com/jansel --- test/dynamo/test_misc.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/dynamo/test_misc.py b/test/dynamo/test_misc.py index b55fdb1fc7b..dc9e99f7701 100644 --- a/test/dynamo/test_misc.py +++ b/test/dynamo/test_misc.py @@ -80,6 +80,7 @@ from torch.testing._internal.common_utils import ( IS_FBCODE, set_default_dtype, skipIfNNModuleInlined, + skipIfWindows, wrapDeterministicFlagAPITest, ) from torch.testing._internal.jit_utils import JitTestCase @@ -2848,6 +2849,9 @@ utils_device.CURRENT_DEVICE == None""".split( else: self.assertExpectedInline(str(cnts.frame_count), """2""") + @skipIfWindows( + msg="AssertionError: Object comparison failed: dtype('int64') != " + ) def test_numpy_with_builtin_type(self): x = np.random.rand(5) @@ -2921,6 +2925,9 @@ utils_device.CURRENT_DEVICE == None""".split( self.assertEqual(fn(x), compiled_fn(x)) self.assertEqual(counter.frame_count, 2) + @skipIfWindows( + msg="AssertionError: The values for attribute 'dtype' do not match: torch.int32 != torch.int64." + ) def test_trace_ndarray_frame_2(self): # no tensors/ndarray as inputs in the frame def fn(x): @@ -10483,6 +10490,9 @@ ShapeEnv not equal: field values don't match: else: res.backward(grad) + @skipIfWindows( + msg="AssertionError: False is not true : Encountered an unexpected fallback to 'aten pow' in dynamo compiled code" + ) def test_torch_dynamo_codegen_pow(self): def pow(x): return x**2 @@ -10605,6 +10615,9 @@ ShapeEnv not equal: field values don't match: torch.compile(fn4, backend="eager")(x) self.assertEqual(3, len(torch._dynamo.utils.get_compilation_metrics())) + @skipIfWindows( + msg="TypeError: sequence item 0: expected str instance, NoneType found" + ) def test_funcname_cache(self): src = """\ import torch