• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 Huawei Technologies Co., Ltd
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# ============================================================================
15import os
16import pytest
17
18
19@pytest.mark.level2
20@pytest.mark.platform_x86_gpu_training
21@pytest.mark.env_single
22def test_nccl_lenet():
23    return_code = os.system("mpirun -n 8 pytest -s test_nccl_lenet.py")
24    assert return_code == 0
25
26
27@pytest.mark.level0
28@pytest.mark.platform_x86_gpu_training
29@pytest.mark.env_single
30def test_nccl_all_reduce_op():
31    return_code = os.system("mpirun -n 8 pytest -s test_nccl_all_reduce_op.py")
32    assert return_code == 0
33
34
35@pytest.mark.level0
36@pytest.mark.platform_x86_gpu_training
37@pytest.mark.env_single
38def test_nccl_all_gather_op():
39    return_code = os.system("mpirun -n 8 pytest -s test_nccl_all_gather_op.py")
40    assert return_code == 0
41
42
43@pytest.mark.level0
44@pytest.mark.platform_x86_gpu_training
45@pytest.mark.env_single
46def test_nccl_reduce_scatter_op():
47    return_code = os.system("mpirun -n 8 pytest -s test_nccl_reduce_scatter_op.py")
48    assert return_code == 0
49
50@pytest.mark.level0
51@pytest.mark.platform_x86_gpu_training
52@pytest.mark.env_single
53def test_nccl_broadcast_op():
54    return_code = os.system("mpirun -n 8 pytest -s test_nccl_broadcast_op.py")
55    assert return_code == 0
56
57@pytest.mark.level0
58@pytest.mark.platform_x86_gpu_training
59@pytest.mark.env_single
60def test_nccl_send_recv_op():
61    return_code = os.system("mpirun -n 8 pytest -s test_nccl_send_recv_op.py")
62    assert return_code == 0
63