forked from microsoft/DeepSpeed
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (43 loc) · 1.26 KB
/
huawei-ascend-npu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: huawei-ascend-npu
on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/huawei-ascend-npu.yml'
- 'requirements/**'
schedule:
- cron: "0 0 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
issues: write
jobs:
unit-tests:
runs-on: [self-hosted, ascend, npu]
container:
image: ascendai/cann
ports:
- 80
steps:
- uses: actions/checkout@v4
- name: Install pytorch
run: |
apt-get update
pip3 install -U --cache-dir $TORCH_CACHE torch torchvision --index-url https://download.pytorch.org/whl/cu118
pip3 install torch_npu
python -c "import torch; print('torch:', torch.__version__, torch)"
python -c "import torch; import torch_npu; print('torch_npu:', torch.npu.is_available(),',version:', torch_npu.__version__, torch)"
- name: Install deepspeed
run: |
pip install .
ds_report
- name: Python environment
run: |
pip list
- name: Multi-card parallel training
run: |
git clone https://github.com/microsoft/DeepSpeedExamples.git
cd DeepSpeedExamples
deepspeed ./training/cifar/cifar10_deepspeed.py