Unverified Commit d150afdc authored by Hubert Lu's avatar Hubert Lu Committed by GitHub
Browse files

Skip failing unit tests (#61)

* Skip failing unit tests

* Modify the test skipping messages
parent 692e1956
...@@ -73,10 +73,12 @@ class TestBasicCastsHalf(_TestBasicCasts): ...@@ -73,10 +73,12 @@ class TestBasicCastsHalf(_TestBasicCasts):
def tearDown(self): def tearDown(self):
self.handle._deactivate() self.handle._deactivate()
@unittest.skip("The failing unit test is introduced by a PyTorch commit sometime in between rocm/pytorch:rocm4.3.1_ubuntu18.04_py3.6_pytorch_1.9.0 and 2021/12/01. Same error is also observed on CUDA. Please refer to https://github.com/ROCmSoftwarePlatform/apex/issues/62")
def test_linear_is_half(self): def test_linear_is_half(self):
self._test_linear(ALWAYS_HALF) self._test_linear(ALWAYS_HALF)
@unittest.skip("The failing unit test is introduced by a PyTorch commit sometime in between rocm/pytorch:rocm4.3.1_ubuntu18.04_py3.6_pytorch_1.9.0 and 2021/12/01. Same error is also observed on CUDA. Please refer to https://github.com/ROCmSoftwarePlatform/apex/issues/62")
def test_conv2d_is_half(self): def test_conv2d_is_half(self):
self._test_conv2d(ALWAYS_HALF) self._test_conv2d(ALWAYS_HALF)
......
...@@ -138,6 +138,7 @@ class TestCache(unittest.TestCase): ...@@ -138,6 +138,7 @@ class TestCache(unittest.TestCase):
def test_whitelist_module_bfp16_weight(self): def test_whitelist_module_bfp16_weight(self):
self.train_eval_train_test(WhitelistModule, torch.bfloat16, "O4") self.train_eval_train_test(WhitelistModule, torch.bfloat16, "O4")
@unittest.skip("The failing unit test is introduced by a PyTorch commit sometime in between rocm/pytorch:rocm4.3.1_ubuntu18.04_py3.6_pytorch_1.9.0 and 2021/12/01. Same error is also observed on CUDA. Please refer to https://github.com/ROCmSoftwarePlatform/apex/issues/62")
def test_whitelist_module_fp32_weight(self): def test_whitelist_module_fp32_weight(self):
self.train_eval_train_test(WhitelistModule, torch.float32, "O4") self.train_eval_train_test(WhitelistModule, torch.float32, "O4")
......
...@@ -69,6 +69,7 @@ class TestCheckpointing(unittest.TestCase): ...@@ -69,6 +69,7 @@ class TestCheckpointing(unittest.TestCase):
'key: {}\nparam: {}\nrestored: {}\ndiff: {} for {}'.format( 'key: {}\nparam: {}\nrestored: {}\ndiff: {} for {}'.format(
key, paramA, paramB, paramA - paramB, test_setup)) key, paramA, paramB, paramA - paramB, test_setup))
@unittest.skip("The failing unit test is introduced by a PyTorch commit sometime in between rocm/pytorch:rocm4.3.1_ubuntu18.04_py3.6_pytorch_1.9.0 and 2021/12/01. Same error is also observed on CUDA. Please refer to https://github.com/ROCmSoftwarePlatform/apex/issues/62")
def test_restoring(self): def test_restoring(self):
nb_epochs = 10 nb_epochs = 10
nb_epochs_restore = nb_epochs // 2 nb_epochs_restore = nb_epochs // 2
...@@ -220,6 +221,7 @@ class TestCheckpointing(unittest.TestCase): ...@@ -220,6 +221,7 @@ class TestCheckpointing(unittest.TestCase):
unskipped_target = 0 unskipped_target = 0
self.assertEqual(scaler['unskipped'], unskipped_target) self.assertEqual(scaler['unskipped'], unskipped_target)
@unittest.skip("The failing unit test is introduced by a PyTorch commit sometime in between rocm/pytorch:rocm4.3.1_ubuntu18.04_py3.6_pytorch_1.9.0 and 2021/12/01. Same error is also observed on CUDA. Please refer to https://github.com/ROCmSoftwarePlatform/apex/issues/62")
def test_state_dict(self): def test_state_dict(self):
for opt_level in self.test_opt_levels: for opt_level in self.test_opt_levels:
# Skip O3 # Skip O3
......
...@@ -39,15 +39,18 @@ class TestRnnCells(unittest.TestCase): ...@@ -39,15 +39,18 @@ class TestRnnCells(unittest.TestCase):
outputs[-1].float().sum().backward() outputs[-1].float().sum().backward()
for i, x in enumerate(xs): for i, x in enumerate(xs):
self.assertEqual(x.grad.dtype, x.dtype) self.assertEqual(x.grad.dtype, x.dtype)
@unittest.skip("The failing unit test is introduced by a PyTorch commit sometime in between rocm/pytorch:rocm4.3.1_ubuntu18.04_py3.6_pytorch_1.9.0 and 2021/12/01. Same error is also observed on CUDA. Please refer to https://github.com/ROCmSoftwarePlatform/apex/issues/62")
def test_rnn_cell_is_half(self): def test_rnn_cell_is_half(self):
cell = nn.RNNCell(self.h, self.h) cell = nn.RNNCell(self.h, self.h)
self.run_cell_test(cell) self.run_cell_test(cell)
@unittest.skip("The failing unit test is introduced by a PyTorch commit sometime in between rocm/pytorch:rocm4.3.1_ubuntu18.04_py3.6_pytorch_1.9.0 and 2021/12/01. Same error is also observed on CUDA. Please refer to https://github.com/ROCmSoftwarePlatform/apex/issues/62")
def test_gru_cell_is_half(self): def test_gru_cell_is_half(self):
cell = nn.GRUCell(self.h, self.h) cell = nn.GRUCell(self.h, self.h)
self.run_cell_test(cell) self.run_cell_test(cell)
@unittest.skip("The failing unit test is introduced by a PyTorch commit sometime in between rocm/pytorch:rocm4.3.1_ubuntu18.04_py3.6_pytorch_1.9.0 and 2021/12/01. Same error is also observed on CUDA. Please refer to https://github.com/ROCmSoftwarePlatform/apex/issues/62")
def test_lstm_cell_is_half(self): def test_lstm_cell_is_half(self):
cell = nn.LSTMCell(self.h, self.h) cell = nn.LSTMCell(self.h, self.h)
self.run_cell_test(cell, state_tuple=True) self.run_cell_test(cell, state_tuple=True)
......
...@@ -96,7 +96,8 @@ class TestFusedAdam(TestFusedOptimizer): ...@@ -96,7 +96,8 @@ class TestFusedAdam(TestFusedOptimizer):
def test_float(self): def test_float(self):
self.gen_single_type_test(param_type=torch.float) self.gen_single_type_test(param_type=torch.float)
@unittest.skip("NaN issue observed on ROCm as of 12/1/2021. The failing unit test is introduced by a PyTorch commit sometime in between rocm/pytorch:rocm4.3.1_ubuntu18.04_py3.6_pytorch_1.9.0 and 2021/12/01. Please refer to https://github.com/ROCmSoftwarePlatform/apex/issues/63")
def test_half(self): def test_half(self):
self.gen_single_type_test(param_type=torch.float16) self.gen_single_type_test(param_type=torch.float16)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment