已合并
skip ci failed testcase #36230
XianglongZeng创建于 5月20日
skip ci failed testcase #36230
已合并
XianglongZeng创建于 5月20日
6 个文件变更+27-5
Mtest/_afd/test_attention_worker_schedule.py+7-2
@@ -1,8 +1,12 @@
1import unittest1import unittest
2import torch2import torch
3import torch.nn as nn3import torch.nn as nn
4-import torchair4+try:
5-from torchair.configs.compiler_config import CompilerConfig5+ import torchair
6+ from torchair.configs.compiler_config import CompilerConfig
7+ HAS_TORCHAIR = True
8+except ImportError:
9+ HAS_TORCHAIR = False
6 10 
7import torch_npu11import torch_npu
8from torch_npu.testing.common_utils import SupportedDevices12from torch_npu.testing.common_utils import SupportedDevices
@@ -46,6 +50,7 @@ class TestModel(nn.Module):
46 return torch_npu._afd.attention_worker_scheduler(schedule_context)50 return torch_npu._afd.attention_worker_scheduler(schedule_context)
47 51 
48 52 
53+@unittest.skipUnless(HAS_TORCHAIR, "torchair is not available")
49class TestAttentionWorkerScheduler(TestCase):54class TestAttentionWorkerScheduler(TestCase):
50 def setUp(self):55 def setUp(self):
51 self.context_holder = torch_npu._afd.create_schedule_context_holder(schedule_mode=1, session_num=attn_workers,56 self.context_holder = torch_npu._afd.create_schedule_context_holder(schedule_mode=1, session_num=attn_workers,
Mtest/_afd/test_ffn_worker_schedule.py+7-2
@@ -1,8 +1,12 @@
1import unittest1import unittest
2import torch2import torch
3import torch.nn as nn3import torch.nn as nn
4-import torchair4+try:
5-from torchair.configs.compiler_config import CompilerConfig5+ import torchair
6+ from torchair.configs.compiler_config import CompilerConfig
7+ HAS_TORCHAIR = True
8+except ImportError:
9+ HAS_TORCHAIR = False
6 10 
7import torch_npu11import torch_npu
8from torch_npu.testing.common_utils import SupportedDevices12from torch_npu.testing.common_utils import SupportedDevices
@@ -44,6 +48,7 @@ class TestModel(nn.Module):
44 return torch_npu._afd.ffn_worker_scheduler(schedule_context, sync_group_size=1)48 return torch_npu._afd.ffn_worker_scheduler(schedule_context, sync_group_size=1)
45 49 
46 50 
51+@unittest.skipUnless(HAS_TORCHAIR, "torchair is not available")
47class TestFfnWorkerScheduler(TestCase):52class TestFfnWorkerScheduler(TestCase):
48 def setUp(self):53 def setUp(self):
49 self.context_holder = torch_npu._afd.create_schedule_context_holder(schedule_mode=0, session_num=attn_workers,54 self.context_holder = torch_npu._afd.create_schedule_context_holder(schedule_mode=0, session_num=attn_workers,
Mtest/custom_ops/test_npu_multi_head_attention.py+2-0
@@ -1,5 +1,6 @@
1import torch1import torch
2import torch.nn.functional as F2import torch.nn.functional as F
3+import unittest
3 4 
4import torch_npu5import torch_npu
5from torch_npu.testing.common_utils import create_common_tensor6from torch_npu.testing.common_utils import create_common_tensor
@@ -57,6 +58,7 @@ class TestMultiHeadAttention(TestCase):
57 query_bias, key_bias, value_bias, out_proj_bias, drop_mask,58 query_bias, key_bias, value_bias, out_proj_bias, drop_mask,
58 attn_head_num, attn_dim_per_head, src_len, tgt_len, dropout_prob, softmax_use_float)59 attn_head_num, attn_dim_per_head, src_len, tgt_len, dropout_prob, softmax_use_float)
59 60 
61+ @unittest.skip("Skip: pre-existing assertRtolEqual precision issue on ARM CI")
60 def test_npu_multi_head_attention(self):62 def test_npu_multi_head_attention(self):
61 batch = 863 batch = 8
62 attn_head_num = 1664 attn_head_num = 16
Mtest/nn/test_module_hooks.py+4-0
@@ -1457,6 +1457,10 @@ class TestModuleHookNN(NNTestCase):
1457 out, _ = mod(True, inp)1457 out, _ = mod(True, inp)
1458 out.sum().backward()1458 out.sum().backward()
1459 1459 
1460+ @unittest.skip(
1461+ "Skip: pre-existing error message mismatch "
1462+ "(BackwardHookFunctionBackward vs BackwardHookFunction) on ARM CI"
1463+ )
1460 def test_hook_inplace(self):1464 def test_hook_inplace(self):
1461 class MyModule(nn.Module):1465 class MyModule(nn.Module):
1462 def forward(self, inp, do_inplace):1466 def forward(self, inp, do_inplace):
Mtest/test_multiprocessing_api.py+4-0
@@ -176,6 +176,10 @@ class TestMultiprocessingAPIs(TestCase):
176 self.assertEqual(shared_namespace.x, 1)176 self.assertEqual(shared_namespace.x, 1)
177 self.assertEqual(shared_namespace.y, 'test')177 self.assertEqual(shared_namespace.y, 'test')
178 178 
179+ @unittest.skip(
180+ "Skip: pre-existing issue, npu_tensor.cpu() != reconstructed_npu.cpu() "
181+ "after reduce_tensor on ARM CI"
182+ )
179 def test_reductions(self):183 def test_reductions(self):
180 """Test torch.multiprocessing.reductions.init_reductions and reduce_tensor APIs"""184 """Test torch.multiprocessing.reductions.init_reductions and reduce_tensor APIs"""
181 # Test init_reductions - verify it doesn't raise any exception185 # Test init_reductions - verify it doesn't raise any exception
Mtest/unsupported_test_cases/.pytorch-disabled-tests.json+3-1
@@ -32156,5 +32156,7 @@
32156 "test_silu (__main__.TestActivations)": ["", [""]],32156 "test_silu (__main__.TestActivations)": ["", [""]],
32157 "test_codegen_upcast_to_fp32_emits_cast_bfloat16_upcast_flag_True (__main__.TestCodegenUpcastToFP32)": ["", [""]],32157 "test_codegen_upcast_to_fp32_emits_cast_bfloat16_upcast_flag_True (__main__.TestCodegenUpcastToFP32)": ["", [""]],
32158 "test_data_parallel_rnn (__main__.TestDataParallel)": ["", ["Disabled during A1 to A2 chip transition"]],32158 "test_data_parallel_rnn (__main__.TestDataParallel)": ["", ["Disabled during A1 to A2 chip transition"]],
32159- "test_alltoall_single_2p_size_dist (__main__.HcclAlltoAllSingleTest)": ["", ["Disabled during A1 to A2 chip transition"]]32159+ "test_alltoall_single_2p_size_dist (__main__.HcclAlltoAllSingleTest)": ["", ["Disabled during A1 to A2 chip transition"]],
32160+ "test_grad_with_split_b_w (__main__.TestScheduleLowering)": ["", [""]],
32161+ "test_grad_with_v_schedule (__main__.TestScheduleLowering)": ["", [""]]
32160}32162}