已合并
在A5上面跳过test_allgather_into_tensor.py中的两个用例 #38902
在A5上面跳过test_allgather_into_tensor.py中的两个用例 #38902
已合并
xiaoqi-zhou创建于 6月22日
1 个文件变更+5-7
Mtest/distributed/test_allgather_into_tensor.py+5-7
@@ -1,15 +1,11 @@
1-import unittest
2-import os
3-from random import randint
4- 
5import numpy as np1import numpy as np
2+ 
6import torch3import torch
7import torch.distributed as dist4import torch.distributed as dist
8-import torch.multiprocessing as mp
9-import torch_npu
10 5 
6+import torch_npu
11from torch_npu.testing.testcase import TestCase, run_tests7from torch_npu.testing.testcase import TestCase, run_tests
12-from torch_npu.testing.common_utils import create_common_tensor8+from torch_npu.testing.common_utils import create_common_tensor, SupportedDevices
13from torch_npu.testing.common_distributed import skipIfUnsupportMultiNPU9from torch_npu.testing.common_distributed import skipIfUnsupportMultiNPU
14 10 
15from test_allgather import HcclAllGatherTestBase11from test_allgather import HcclAllGatherTestBase
@@ -61,6 +57,7 @@ class HcclAllGatherIntoTensorTest(HcclAllGatherTestBase):
61 with test_case.assertRaisesRegex(RuntimeError, error_expect):57 with test_case.assertRaisesRegex(RuntimeError, error_expect):
62 pg.all_gather_into_tensor(gather_tensor, input1)58 pg.all_gather_into_tensor(gather_tensor, input1)
63 59 
60+ @SupportedDevices(['Ascend910A', 'Ascend910B', 'Ascend910_93'])
64 @skipIfUnsupportMultiNPU(2)61 @skipIfUnsupportMultiNPU(2)
65 def test_all_gather_into_tensor_dist(self):62 def test_all_gather_into_tensor_dist(self):
66 ranks = [2]63 ranks = [2]
@@ -110,6 +107,7 @@ class HcclAllGatherIntoTensorTest(HcclAllGatherTestBase):
110 dist.barrier()107 dist.barrier()
111 p2c.get()108 p2c.get()
112 109 
110+ @SupportedDevices(['Ascend910A', 'Ascend910B', 'Ascend910_93'])
113 @skipIfUnsupportMultiNPU(2)111 @skipIfUnsupportMultiNPU(2)
114 def test_all_gather_into_tensor_uneven_dist(self):112 def test_all_gather_into_tensor_uneven_dist(self):
115 ranks = [2]113 ranks = [2]