Skip to content

Commit 810b4ac

Browse files
authored
mark expected failure test cases (#102)
1 parent f464c63 commit 810b4ac

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

tests/cpu/common_nn.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
from torch.nn.functional import _Reduction
6464
from common_utils import TestCase, to_gpu, freeze_rng_state, is_iterable, \
6565
TEST_WITH_ROCM
66-
from common_cuda import TEST_CUDA
6766
from torch.autograd.gradcheck import get_numerical_jacobian, iter_tensors
6867
from torch.autograd import Variable
6968
import torch.backends.cudnn

tests/cpu/test_bf16_lazy_reorder.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def test_batch_norm2d(self):
8080
self.assertEqual(res_bf16.dtype, torch.bfloat16)
8181

8282
with AutoMixPrecision(True):
83-
ipex.core.enable_mix_bf16_fp32()
8483
self.assertEqual(x_auto_mix.dtype, torch.float)
8584
self.assertFalse(ipex.core.is_bf16_dil_tensor(x_auto_mix))
8685
res_auto_mix = bn_auto_mix(x_auto_mix)
@@ -108,7 +107,6 @@ def test_batch_norm3d(self):
108107
self.assertEqual(x_man_bf16.dtype, torch.bfloat16)
109108

110109
with AutoMixPrecision(True):
111-
ipex.core.enable_mix_bf16_fp32()
112110
self.assertEqual(x_auto_mix.dtype, torch.float)
113111
self.assertFalse(ipex.core.is_bf16_dil_tensor(x_auto_mix))
114112
res_auto_mix = bn_auto_mix(x_auto_mix)

tests/cpu/test_rn50_cpu_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ def test_avg_pool3d_with_zero_divisor(self):
827827
self.assertRaisesRegex(RuntimeError, "divisor must be not zero",
828828
lambda: torch.nn.functional.avg_pool3d(torch.zeros(3, 3, 3, 3), (2, 2, 2), divisor_override=0))
829829

830-
@unittest.skip("oneDNN does not support this case")
830+
@unittest.expectedFailure
831831
def test_max_pool_nan(self):
832832
for adaptive in ['', 'adaptive_']:
833833
for num_dim in [1, 2, 3]:

tests/cpu/test_torch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,6 +1581,7 @@ def _test_multinomial_invalid_probs(probs):
15811581
except RuntimeError as e:
15821582
return 'invalid multinomial distribution' in str(e)
15831583

1584+
@slowTest
15841585
@unittest.skipIf(NO_MULTIPROCESSING_SPAWN, "Disabled for environments that \
15851586
don't support multiprocessing with spawn start method")
15861587
@unittest.skipIf(IS_WINDOWS, 'FIXME: CUDA OOM error on Windows')
@@ -10265,7 +10266,7 @@ def test_unfold_scalars(self, device):
1026510266
self.assertEqual(torch.empty(0, device=device), x.unfold(0, 0, 2))
1026610267
self.assertEqual(torch.tensor([0.5], device=device), x.unfold(0, 1, 1))
1026710268

10268-
@unittest.skipIf(SKIP_TEST_CASE_FOR_DPCPP_STORAGE, "IPEX does not support copy")
10269+
@unittest.expectedFailure
1026910270
def test_copy_all_dtypes_and_devices(self, device):
1027010271
from copy import copy
1027110272
ipex.get_auto_optimization()
@@ -12835,7 +12836,7 @@ def transformation_fn(tensor, **kwargs):
1283512836
self._test_memory_format_transformations(
1283612837
device, get_generator(mf, shape), transformation_fn, mf, default_is_preserve=True)
1283712838

12838-
@unittest.skipIf(SKIP_TEST_CASE_FOR_DPCPP_STORAGE, "IPEX feature limitation")
12839+
@unittest.expectedFailure
1283912840
def test_memory_format_clone(self, device):
1284012841
def get_generator(memory_format, shape):
1284112842
def input_generator_fn(device):

0 commit comments

Comments
 (0)