Skip test_none_names_refcount under Dynamo-wrapped CI (#118309)

Fixes https://github.com/pytorch/pytorch/issues/117716
Dynamo does some things that modifies the refcount. Skipping this test.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/118309
Approved by: https://github.com/ydwu4, https://github.com/yanboliang, https://github.com/albanD
ghstack dependencies: #118152
This commit is contained in:
rzou 2024-01-25 09:40:07 -08:00 committed by PyTorch MergeBot
parent 4e45d791e7
commit f7f7283ec7
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
import unittest
from torch.testing._internal.common_utils import TestCase, run_tests, TEST_NUMPY
from torch.testing._internal.common_utils import skipIfTorchDynamo
from torch.testing._internal.common_cuda import TEST_CUDA
from torch.testing._internal.common_device_type import get_all_device_types
from collections import namedtuple, OrderedDict
@ -148,6 +149,7 @@ class TestNamedTensor(TestCase):
names65 = ['A' * i for i in range(1, 66)]
x = factory([1] * 65, names=names64, device=device)
@skipIfTorchDynamo("not a bug: Dynamo causes the refcounts to be different")
def test_none_names_refcount(self, N=10):
def scope():
unnamed = torch.empty(2, 3)

View File

@ -1874,7 +1874,6 @@ dynamo_expected_failures = {
"TestNamedTensor.test_addcmul_addcdiv", # test_namedtensor
"TestNamedTensor.test_big_tensor_repr_has_names", # test_namedtensor
"TestNamedTensor.test_unsupported_op_error_msg", # test_namedtensor
"TestNamedTensor.test_none_names_refcount", # test_namedtensor
"TestNamedTensor.test_addmm", # test_namedtensor
"TestNamedTensor.test_pow_special", # test_namedtensor
"TestNamedTensor.test_autograd_ignores_names", # test_namedtensor