XFAIL test_MaxUnpool_index_errors CUDA slow tests (#103905)

This has been failing in trunk for a while.  Let's XFAIL it while continuing the investigation https://github.com/pytorch/pytorch/issues/103854.  We might not need this PR if the fix is on the way.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/103905
Approved by: https://github.com/mikaylagawarecki
This commit is contained in:
Huy Do 2023-06-22 18:05:10 +00:00 committed by PyTorch MergeBot
parent abd4ee8150
commit f27a9129e7

View file

@ -19,7 +19,7 @@ from torch.testing._internal.common_cuda import TEST_CUDA
from torch.testing._internal.common_nn import NNTestCase, _test_bfloat16_ops, _test_module_empty_input
from torch.testing._internal.common_device_type import largeTensorTest, onlyNativeDeviceTypes, dtypes, \
instantiate_device_type_tests, skipCUDAIfRocm, expectedFailureMeta, dtypesIfCUDA, onlyCPU, onlyCUDA, \
TEST_WITH_ROCM
TEST_WITH_ROCM, expectedFailureCUDA
from torch.testing._internal.common_dtype import floating_types_and
import torch.nn.functional as F
import torch.nn as nn
@ -547,17 +547,52 @@ class TestPoolingNNDeviceType(NNTestCase):
@onlyNativeDeviceTypes
@skipCUDAIfRocm
@parametrize_test("module_name,module_size,output_size,test_index,should_error", [
subtest(('MaxUnpool2d', (2, 2), (1, 3, 4, 5), -1, True), name='case1'),
subtest(('MaxUnpool2d', (2, 2), (1, 3, 4, 5), 2 * 2 * 4 * 5, True), name='case2'),
subtest(('MaxUnpool2d', (2, 2), (1, 3, 4, 5), (2 * 2 * 4 * 5) - 1, False), name='case3'),
subtest(('MaxUnpool2d', (2, 3), (2, 1, 4, 2), 2 * 3 * 4 * 2, True), name='case4'),
subtest(('MaxUnpool2d', (2, 3), (2, 1, 4, 2), (2 * 3 * 4 * 2) - 1, False), name='case5'),
subtest(('MaxUnpool3d', (2, 2, 2), (1, 3, 4, 5), -1, True), name='case6'),
subtest(('MaxUnpool3d', (2, 2, 2), (1, 3, 4, 5), 2 * 2 * 2 * 3 * 4 * 5, True), name='case7'),
subtest(('MaxUnpool3d', (2, 2, 2), (1, 3, 4, 5), (2 * 2 * 2 * 3 * 4 * 5) - 1, False), name='case8'),
subtest(('MaxUnpool3d', (2, 2, 2), (2, 3, 4, 1), 2 * 2 * 2 * 3 * 4 * 1, True), name='case9'),
subtest(('MaxUnpool3d', (2, 2, 2), (2, 3, 4, 1), (2 * 2 * 2 * 3 * 4 * 1) - 1, False), name='case10'),
# Some tests are failing in trunk https://github.com/pytorch/pytorch/issues/103854
subtest(
('MaxUnpool2d', (2, 2), (1, 3, 4, 5), -1, True),
name='case1',
decorators=[expectedFailureCUDA]
),
subtest(
('MaxUnpool2d', (2, 2), (1, 3, 4, 5), 2 * 2 * 4 * 5, True),
name='case2',
decorators=[expectedFailureCUDA]
),
subtest(
('MaxUnpool2d', (2, 2), (1, 3, 4, 5), (2 * 2 * 4 * 5) - 1, False),
name='case3'
),
subtest(
('MaxUnpool2d', (2, 3), (2, 1, 4, 2), 2 * 3 * 4 * 2, True),
name='case4',
decorators=[expectedFailureCUDA]
),
subtest(
('MaxUnpool2d', (2, 3), (2, 1, 4, 2), (2 * 3 * 4 * 2) - 1, False),
name='case5'
),
subtest(
('MaxUnpool3d', (2, 2, 2), (1, 3, 4, 5), -1, True),
name='case6',
decorators=[expectedFailureCUDA]),
subtest(
('MaxUnpool3d', (2, 2, 2), (1, 3, 4, 5), 2 * 2 * 2 * 3 * 4 * 5, True),
name='case7',
decorators=[expectedFailureCUDA]
),
subtest(
('MaxUnpool3d', (2, 2, 2), (1, 3, 4, 5), (2 * 2 * 2 * 3 * 4 * 5) - 1, False),
name='case8'
),
subtest(
('MaxUnpool3d', (2, 2, 2), (2, 3, 4, 1), 2 * 2 * 2 * 3 * 4 * 1, True),
name='case9',
decorators=[expectedFailureCUDA]
),
subtest(
('MaxUnpool3d', (2, 2, 2), (2, 3, 4, 1), (2 * 2 * 2 * 3 * 4 * 1) - 1, False),
name='case10'
),
])
def test_MaxUnpool_index_errors(self, device, module_name, module_size, output_size, test_index, should_error):
# NOTE: CUDA tests need to be run in a subprocess because they cause device asserts