|
| 1 | +name: Compatibility Test on ARM64 |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: [main] |
| 6 | + types: [opened, reopened, ready_for_review, synchronize] |
| 7 | + paths: |
| 8 | + - "auto_round/**" |
| 9 | + - "auto_round_extension/**" |
| 10 | + - "setup.py" |
| 11 | + - "setup.cfg" |
| 12 | + - "requirements.txt" |
| 13 | + - "requirements-cpu.txt" |
| 14 | + - ".github/workflows/compatibility-test.yml" |
| 15 | + - "!**/*.md" |
| 16 | + workflow_dispatch: |
| 17 | + |
| 18 | +concurrency: |
| 19 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 20 | + cancel-in-progress: true |
| 21 | + |
| 22 | +jobs: |
| 23 | + compatibility-test-arm: |
| 24 | + name: ${{ matrix.os-name }} on ARM64 |
| 25 | + runs-on: ${{ matrix.os }} |
| 26 | + timeout-minutes: 60 |
| 27 | + strategy: |
| 28 | + fail-fast: false |
| 29 | + matrix: |
| 30 | + include: |
| 31 | + - os: macos-latest |
| 32 | + os-name: macOS |
| 33 | + shell: bash |
| 34 | + - os: ubuntu-24.04-arm |
| 35 | + os-name: Linux |
| 36 | + shell: bash |
| 37 | + |
| 38 | + defaults: |
| 39 | + run: |
| 40 | + shell: ${{ matrix.shell }} |
| 41 | + |
| 42 | + steps: |
| 43 | + - name: Checkout code |
| 44 | + uses: actions/checkout@v6 |
| 45 | + |
| 46 | + - name: Set up Python |
| 47 | + uses: actions/setup-python@v6 |
| 48 | + with: |
| 49 | + python-version: "3.12" |
| 50 | + |
| 51 | + - name: Verify ARM architecture |
| 52 | + run: | |
| 53 | + python -c "import platform; print(f'Architecture: {platform.machine()}')" |
| 54 | +
|
| 55 | + - name: Install dependencies |
| 56 | + run: | |
| 57 | + python -m pip install --upgrade pip uv setuptools |
| 58 | + uv pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu |
| 59 | + uv pip install datasets --upgrade |
| 60 | + uv pip install . |
| 61 | + pip list |
| 62 | + env: |
| 63 | + PYTHONUNBUFFERED: "1" |
| 64 | + UV_NO_PROGRESS: "1" |
| 65 | + UV_SYSTEM_PYTHON: "1" |
| 66 | + TQDM_MININTERVAL: "60" |
| 67 | + |
| 68 | + - name: Run compatibility test |
| 69 | + run: | |
| 70 | + set -xe |
| 71 | + python -c "import auto_round" |
| 72 | + echo "============================================================================" |
| 73 | + auto-round --model_name Qwen/Qwen3-0.6B --bits 4 --iters 0 --nsamples 8 |
| 74 | + echo "============================================================================" |
| 75 | + auto-round --model_name Qwen/Qwen3-0.6B --bits 4 --iters 1 --nsamples 8 |
| 76 | + env: |
| 77 | + TQDM_MININTERVAL: "60" |
| 78 | + PYTHONUNBUFFERED: "1" |
0 commit comments