已合并
在A5上面跳过test_allgather_into_tensor.py中的两个用例 #38902
xiaoqi-zhou创建于 6月22日
在A5上面跳过test_allgather_into_tensor.py中的两个用例 #38902
已合并
共 1 个文件变更+5-7
| @@ -1,15 +1,11 @@ | |||
| 1 | -import unittest | ||
| 2 | -import os | ||
| 3 | -from random import randint | ||
| 4 | - | ||
| 5 | import numpy as np | 1 | import numpy as np |
| 2 | + | ||
| 6 | import torch | 3 | import torch |
| 7 | import torch.distributed as dist | 4 | import torch.distributed as dist |
| 8 | -import torch.multiprocessing as mp | ||
| 9 | -import torch_npu | ||
| 10 | 5 | ||
| 6 | +import torch_npu | ||
| 11 | from torch_npu.testing.testcase import TestCase, run_tests | 7 | from torch_npu.testing.testcase import TestCase, run_tests |
| 12 | -from torch_npu.testing.common_utils import create_common_tensor | 8 | +from torch_npu.testing.common_utils import create_common_tensor, SupportedDevices |
| 13 | from torch_npu.testing.common_distributed import skipIfUnsupportMultiNPU | 9 | from torch_npu.testing.common_distributed import skipIfUnsupportMultiNPU |
| 14 | 10 | ||
| 15 | from test_allgather import HcclAllGatherTestBase | 11 | from 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 | + | ||
| 64 | 61 | ||
| 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 | + | ||
| 113 | 111 | ||
| 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] |