Skip to content

Upstream Accelerate #59

Upstream Accelerate

Upstream Accelerate #59

name: Accelerate integration tests
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
accelerate:
name: Test Accelerate integration
runs-on: [self-hosted, linux, x64, gaudi2, fast]
container:
image: docker://vault.habana.ai/gaudi-docker/1.19.0/ubuntu22.04/habanalabs/pytorch-installer-2.5.1:latest
options: --runtime=habana --shm-size=64G --cap-add=sys_nice
--env OMPI_MCA_btl_vader_single_copy_mechanism=none
--env HABANA_VISIBLE_DEVICES
steps:
- name: Checkout to Accelerate
uses: actions/checkout@v4
with:
ref: hpu-support
repository: huggingface/accelerate
- name: HL-SMI
run: |
hl-smi
echo "HABANA_VISIBLE_DEVICES=${HABANA_VISIBLE_DEVICES}"
echo "HABANA_VISIBLE_MODULES=${HABANA_VISIBLE_MODULES}"
- name: Install Accelerate with DeepSpeed
run: |
pip install -e .[testing] git+https://github.com/HabanaAI/[email protected]
# Remove when safetensors is released
- name: Install Rust and build Safetensors
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
rustup update
git clone https://github.com/huggingface/safetensors
cd safetensors
pip install setuptools_rust
git checkout fa833511664338bfc927fc02653ddb7d38d40be9
pip install -e bindings/python
cd ..
- name: Set environment variables
run: |
export PT_ENABLE_INT64_SUPPORT=1
export PT_HPU_LAZY_MODE=0
export MASTER_PORT=12345
export RUN_SLOW=1
# move to the end of the file
- name: Run Examples tests
run: |
make test_examples
- name: Run CLI tests
run: |
make test_cli
- name: Run Core tests
run: |
make test_core
- name: Run Big Modeling tests
run: |
make test_big_modeling
- name: Run FSDP integration tests
run: |
make test_fsdp
- name: Run DeepSpeed integration tests
run: |
make test_deepspeed