已合并
test update ut #32254
huangyunlong创建于 3月24日
test update ut #32254
已合并
huangyunlong创建于 3月24日
5 个文件变更+7-4
Mtest/onnx/test_pytorch_onnx_onnxruntime_npu.py+1-0
@@ -118,6 +118,7 @@ class TestONNXRuntime_npu(onnx_test_common._TestONNXRuntime):
118 118 
119 # ONNX supports bfloat16 for opsets >= 13119 # ONNX supports bfloat16 for opsets >= 13
120 # Add, Sub and Mul ops don't support bfloat16 cpu in onnxruntime.120 # Add, Sub and Mul ops don't support bfloat16 cpu in onnxruntime.
121+ @unittest.skip("Add, Sub and Mul ops don't support bfloat16 cpu in onnxruntime.")
121 @skipIfUnsupportedMinOpsetVersion(13)122 @skipIfUnsupportedMinOpsetVersion(13)
122 @skipIfNoBFloat16NPU123 @skipIfNoBFloat16NPU
123 def test_arithmetic_bfp16(self):124 def test_arithmetic_bfp16(self):
Mtest/onnx/test_utility_funs.py+1-0
@@ -725,6 +725,7 @@ class TestUtilityFuns(_BaseTestCase):
725 onnx_model = onnx.load(io.BytesIO(f.getvalue()))725 onnx_model = onnx.load(io.BytesIO(f.getvalue()))
726 self.assertEqual(len(onnx_model.graph.initializer), 0)726 self.assertEqual(len(onnx_model.graph.initializer), 0)
727 727 
728+ # onnx need protobuf
728 def test_verbose(self):729 def test_verbose(self):
729 class MyModule(torch.nn.Module):730 class MyModule(torch.nn.Module):
730 def forward(self, input_):731 def forward(self, input_):
Mtest/profiler/test_memory_profiler.py+4-1
@@ -1243,6 +1243,7 @@ class TestMemoryProfilerE2E(TestCase):
1243 aten::add_.Tensor 3 (PARAMETER), 11 (OPTIMIZER_STATE) -> 3 (PARAMETER)""",1243 aten::add_.Tensor 3 (PARAMETER), 11 (OPTIMIZER_STATE) -> 3 (PARAMETER)""",
1244 )1244 )
1245 1245 
1246+ @unittest.skipIf(platform.machine().lower().startswith(('arm', 'aarch')), "Skip this test on ARM-based architectures")
1246 def test_categories_e2e_sequential_fwd(self) -> None:1247 def test_categories_e2e_sequential_fwd(self) -> None:
1247 model = torch.nn.Sequential(1248 model = torch.nn.Sequential(
1248 torch.nn.Linear(2, 4, bias=True),1249 torch.nn.Linear(2, 4, bias=True),
@@ -1264,6 +1265,7 @@ class TestMemoryProfilerE2E(TestCase):
1264 aten::detach 8 (ACTIVATION) -> ???""",1265 aten::detach 8 (ACTIVATION) -> ???""",
1265 )1266 )
1266 1267 
1268+ @unittest.skipIf(platform.machine().lower().startswith(('arm', 'aarch')), "Skip this test on ARM-based architectures")
1267 def test_categories_e2e_sequential_fwd_bwd(self) -> None:1269 def test_categories_e2e_sequential_fwd_bwd(self) -> None:
1268 model = torch.nn.Sequential(1270 model = torch.nn.Sequential(
1269 torch.nn.Linear(2, 4, bias=True),1271 torch.nn.Linear(2, 4, bias=True),
@@ -1339,6 +1341,7 @@ class TestMemoryProfilerE2E(TestCase):
1339 aten::detach 29 (GRADIENT) -> ???""",1341 aten::detach 29 (GRADIENT) -> ???""",
1340 )1342 )
1341 1343 
1344+ @unittest.skipIf(platform.machine().lower().startswith(('arm', 'aarch')), "Skip this test on ARM-based architectures")
1342 def test_memory_timeline(self) -> None:1345 def test_memory_timeline(self) -> None:
1343 model = torch.nn.Sequential(1346 model = torch.nn.Sequential(
1344 torch.nn.Linear(64, 512, bias=True),1347 torch.nn.Linear(64, 512, bias=True),
@@ -1401,7 +1404,7 @@ class TestMemoryProfilerE2E(TestCase):
1401 for _, action, (key, version), size in prof._memory_profile().timeline1404 for _, action, (key, version), size in prof._memory_profile().timeline
1402 # We generally don't care about tiny allocations during memory1405 # We generally don't care about tiny allocations during memory
1403 # profiling and they add a lot of noise to the unit test.1406 # profiling and they add a lot of noise to the unit test.
1404- if size > 10241407+ if size > 1024 and isinstance(key, _memory_profiler.TensorKey)
1405 ]1408 ]
1406 1409 
1407 self.assertExpectedInline(1410 self.assertExpectedInline(
Mtest/requirements.txt+1-0
@@ -19,3 +19,4 @@ parameterized==0.9.0
19torch-scatter==2.1.219torch-scatter==2.1.2
20torchvision==0.22.020torchvision==0.22.0
21ml-dtypes==0.2.021ml-dtypes==0.2.0
22+protobuf==3.20.2
Mtest/unsupported_test_cases/.pytorch-disabled-tests.json+0-3
@@ -30773,9 +30773,6 @@
30773 "test_sparse_zeros_trunc_npu_int8 (__main__.TestSparseUnaryUfuncsPRIVATEUSE1)": ["", [""]],30773 "test_sparse_zeros_trunc_npu_int8 (__main__.TestSparseUnaryUfuncsPRIVATEUSE1)": ["", [""]],
30774 "test_sparse_zeros_trunc_npu_uint8 (__main__.TestSparseUnaryUfuncsPRIVATEUSE1)": ["", [""]],30774 "test_sparse_zeros_trunc_npu_uint8 (__main__.TestSparseUnaryUfuncsPRIVATEUSE1)": ["", [""]],
30775 "test_memory_timeline_no_id (__main__.TestMemoryProfilerE2E)": ["", [""]],30775 "test_memory_timeline_no_id (__main__.TestMemoryProfilerE2E)": ["", [""]],
30776- "test_categories_e2e_sequential_fwd (__main__.TestMemoryProfilerE2E)": ["", ["A2"]],
30777- "test_categories_e2e_sequential_fwd_bwd (__main__.TestMemoryProfilerE2E)": ["", ["A2"]],
30778- "test_memory_timeline (__main__.TestMemoryProfilerE2E)": ["", ["A2"]],
30779 "test_extract_gradients_from_optimizer_set_to_none (__main__.TestIdentifyGradients)": ["", [""]],30776 "test_extract_gradients_from_optimizer_set_to_none (__main__.TestIdentifyGradients)": ["", [""]],
30780 "test_custom_op_fallthrough (__main__.TestUtilityFuns_opset_10)": ["", [""]],30777 "test_custom_op_fallthrough (__main__.TestUtilityFuns_opset_10)": ["", [""]],
30781 "test_custom_op_fallthrough (__main__.TestUtilityFuns_opset_11)": ["", [""]],30778 "test_custom_op_fallthrough (__main__.TestUtilityFuns_opset_11)": ["", [""]],