Skip to content

Commit

Permalink
[inductor] calibration inductor windows uts (7/N) (pytorch#134420)
Browse files Browse the repository at this point in the history
Disable UTs on Windows: `test/dynamo/test_misc.py`

Pull Request resolved: pytorch#134420
Approved by: https://github.com/jansel
  • Loading branch information
xuhancn authored and pytorchmergebot committed Aug 25, 2024
1 parent 97fd087 commit dc1959e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/dynamo/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
IS_FBCODE,
set_default_dtype,
skipIfNNModuleInlined,
skipIfWindows,
wrapDeterministicFlagAPITest,
)
from torch.testing._internal.jit_utils import JitTestCase
Expand Down Expand Up @@ -2848,6 +2849,9 @@ def fn(x: int, y: torch.Tensor):
else:
self.assertExpectedInline(str(cnts.frame_count), """2""")

@skipIfWindows(
msg="AssertionError: Object comparison failed: dtype('int64') != <class 'int'>"
)
def test_numpy_with_builtin_type(self):
x = np.random.rand(5)

Expand Down Expand Up @@ -2921,6 +2925,9 @@ def fn(x):
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):
Expand Down Expand Up @@ -10483,6 +10490,9 @@ def func(a, b):
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
Expand Down Expand Up @@ -10605,6 +10615,9 @@ def metrics_limit_ctx():
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
Expand Down

0 comments on commit dc1959e

Please sign in to comment.