Skip to content

huawei-ascend-npu

huawei-ascend-npu #10

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