Skip to content

huawei-ascend-npu

huawei-ascend-npu #16

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
pip install torch==2.2.0 torchvision==0.17.0 torch_npu==2.2.0 numpy==1.26.4 cloudpickle tornado -i https://pypi.tuna.tsinghua.edu.cn/simple
# python -c "import torch; print('torch:', torch.__version__)"
# python -c "import torch,torch_npu; print('torch_npu:', torch.npu.is_available(),',version:', torch_npu.__version__)"
- name: Install deepspeed
run: |
pip install .
ds_report
- name: Python environment
run: |
pip list
- name: Multi-card parallel training
run: |
apt-get install git
git clone https://github.com/microsoft/DeepSpeedExamples.git
cd DeepSpeedExamples
deepspeed ./training/cifar/cifar10_deepspeed.py