86 lines
2.8 KiB
YAML
86 lines
2.8 KiB
YAML
name: xpu-max1100
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/xpu-max1100.yml"
|
|
- "accelerator/xpu_accelerator.py"
|
|
- "accelerator/abstract_accelerator.py"
|
|
- "accelerator/cpu_accelerator.py"
|
|
- "accelerator/real_accelerator.py"
|
|
- "csrc/xpu/**"
|
|
- "deepspeed/runtime/engine.py"
|
|
- "deepspeed/runtime/bf16_optimizer.py"
|
|
- "deepspeed/runtime/zero/stage_1_and_2.py"
|
|
- "deepspeed/runtime/zero/stage3.py"
|
|
- "deepspeed/runtime/zero/partition_parameters.py"
|
|
- "deepspeed/runtime/zero/partitioned_param_coordinator.py"
|
|
- "deepspeed/runtime/zero/parameter_offload.py"
|
|
- "deepspeed/runtime/pipe/engine.py"
|
|
- "deepspeed/runtime/utils.py"
|
|
- "op_builder/xpu/**"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: xpu-max1100 / unit tests
|
|
runs-on: [self-hosted, intel, xpu]
|
|
container:
|
|
image: intel/oneapi-basekit:2025.0.2-0-devel-ubuntu22.04
|
|
ports:
|
|
- 80
|
|
options: --privileged -it --rm --device /dev/dri:/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --ipc=host --cap-add=ALL
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install prerequisite
|
|
shell: bash
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y python3.11 python3.11-dev python3-pip clinfo libaio-dev
|
|
pip install --upgrade pip
|
|
pip install py-cpuinfo
|
|
pip install torch==2.10.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu
|
|
pip install .[dev,autotuning]
|
|
|
|
- name: Check container state
|
|
shell: bash
|
|
run: |
|
|
ldd --version
|
|
ds_report
|
|
python3 -c "import torch; print('torch:', torch.__version__, torch)"
|
|
python3 -c "import torch; print('XPU available:', torch.xpu.is_available())"
|
|
python3 -c "from deepspeed.accelerator import get_accelerator; print('accelerator:', get_accelerator()._name)"
|
|
pip list
|
|
|
|
- name: Unit tests
|
|
shell: bash
|
|
run: |
|
|
cd tests/unit
|
|
export FI_PROVIDER="tcp"
|
|
export I_MPI_SHM=off
|
|
pytest --verbose accelerator/*
|
|
pytest --verbose autotuning/*
|
|
pytest --verbose model_parallelism/*
|
|
pytest --verbose monitor/*
|
|
pytest --verbose utils/*
|
|
pytest --verbose runtime/test_ds_config_model.py
|
|
pytest --verbose runtime/pipe/test_pipe_schedule.py
|
|
pytest --verbose runtime/zero/test_zero_config.py
|
|
pytest --verbose runtime/zero/test_zero_tiled.py
|
|
pytest --verbose runtime/zero/test_zeropp.py
|
|
pytest --verbose runtime/test_autocast.py
|
|
pytest --verbose runtime/test_data.py
|
|
pytest --verbose runtime/zero/test_zero_dynamic_class.py
|