已合并
test update ut #32255
huangyunlong创建于 3月24日
test update ut #32255
已合并
huangyunlong创建于 3月24日
4 个文件变更+6-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+3-4
@@ -1244,7 +1244,7 @@ class TestMemoryProfilerE2E(TestCase):
1244 aten::add_.Tensor 3 (PARAMETER), 11 (OPTIMIZER_STATE) -> 3 (PARAMETER)""",1244 aten::add_.Tensor 3 (PARAMETER), 11 (OPTIMIZER_STATE) -> 3 (PARAMETER)""",
1245 )1245 )
1246 1246 
1247- @unittest.skip("skip test_categories_e2e_sequential_fwd now")1247+ @unittest.skipIf(platform.machine().lower().startswith(('arm', 'aarch')), "Skip this test on ARM-based architectures")
1248 def test_categories_e2e_sequential_fwd(self) -> None:1248 def test_categories_e2e_sequential_fwd(self) -> None:
1249 model = torch.nn.Sequential(1249 model = torch.nn.Sequential(
1250 torch.nn.Linear(2, 4, bias=True),1250 torch.nn.Linear(2, 4, bias=True),
@@ -1266,7 +1266,7 @@ class TestMemoryProfilerE2E(TestCase):
1266 aten::detach 8 (ACTIVATION) -> ???""",1266 aten::detach 8 (ACTIVATION) -> ???""",
1267 )1267 )
1268 1268 
1269- @unittest.skip("skip test_categories_e2e_sequential_fwd_bwd now")1269+ @unittest.skipIf(platform.machine().lower().startswith(('arm', 'aarch')), "Skip this test on ARM-based architectures")
1270 def test_categories_e2e_sequential_fwd_bwd(self) -> None:1270 def test_categories_e2e_sequential_fwd_bwd(self) -> None:
1271 model = torch.nn.Sequential(1271 model = torch.nn.Sequential(
1272 torch.nn.Linear(2, 4, bias=True),1272 torch.nn.Linear(2, 4, bias=True),
@@ -1342,7 +1342,6 @@ class TestMemoryProfilerE2E(TestCase):
1342 aten::detach 29 (GRADIENT) -> ???""",1342 aten::detach 29 (GRADIENT) -> ???""",
1343 )1343 )
1344 1344 
1345- @unittest.skip("skip test_memory_timeline now")
1346 def test_memory_timeline(self) -> None:1345 def test_memory_timeline(self) -> None:
1347 model = torch.nn.Sequential(1346 model = torch.nn.Sequential(
1348 torch.nn.Linear(64, 512, bias=True),1347 torch.nn.Linear(64, 512, bias=True),
@@ -1405,7 +1404,7 @@ class TestMemoryProfilerE2E(TestCase):
1405 for _, action, (key, version), size in prof._memory_profile().timeline1404 for _, action, (key, version), size in prof._memory_profile().timeline
1406 # We generally don't care about tiny allocations during memory1405 # We generally don't care about tiny allocations during memory
1407 # 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.
1408- if size > 10241407+ if size > 1024 and isinstance(key, _memory_profiler.TensorKey)
1409 ]1408 ]
1410 1409 
1411 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.23.020torchvision==0.23.0
21ml-dtypes==0.2.021ml-dtypes==0.2.0
22+protobuf==5.29.4