|
| 1 | +name: Test CPU Variants |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + operation: |
| 7 | + description: 'Operation to test (e.g., MUL_MAT or full spec)' |
| 8 | + required: false |
| 9 | + default: 'MUL_MAT' |
| 10 | + type: string |
| 11 | + variant: |
| 12 | + description: 'CPU variant to test (leave empty to list available variants)' |
| 13 | + required: false |
| 14 | + default: '' |
| 15 | + type: string |
| 16 | + |
| 17 | +jobs: |
| 18 | + test-cpu-variant: |
| 19 | + runs-on: [self-hosted, Linux, X64, CPU, AMX] |
| 20 | + steps: |
| 21 | + - name: Clone |
| 22 | + uses: actions/checkout@v4 |
| 23 | + |
| 24 | + - name: Build with CPU reference backend |
| 25 | + run: | |
| 26 | + cmake -B build -S . \ |
| 27 | + -DGGML_CPU_REF_BACKEND=ON \ |
| 28 | + -DGGML_CPU_ALL_VARIANTS=ON \ |
| 29 | + -DGGML_CPU_REPACK=ON \ |
| 30 | + -DGGML_NATIVE=OFF \ |
| 31 | + -DGGML_BACKEND_DL=ON \ |
| 32 | + -DGGML_BLAS=OFF \ |
| 33 | + -DCMAKE_BUILD_TYPE=Release |
| 34 | + |
| 35 | + cmake --build build -j8 |
| 36 | +
|
| 37 | + - name: List available CPU variants |
| 38 | + run: | |
| 39 | + echo "Available CPU variants:" |
| 40 | + ./build/bin/test-backend-ops cpu-variants --list |
| 41 | +
|
| 42 | + - name: Test CPU variant |
| 43 | + if: ${{ inputs.variant != '' }} |
| 44 | + run: | |
| 45 | + echo "Testing variant: ${{ inputs.variant }}" |
| 46 | + echo "Operation: ${{ inputs.operation }}" |
| 47 | + ./build/bin/test-backend-ops cpu-variants \ |
| 48 | + --variant ${{ inputs.variant }} \ |
| 49 | + -o "${{ inputs.operation }}" |
| 50 | +
|
| 51 | + - name: Instructions |
| 52 | + if: ${{ inputs.variant == '' }} |
| 53 | + run: | |
| 54 | + echo "==========================================" |
| 55 | + echo "No variant specified - only listed available variants above" |
| 56 | + echo "To test a specific variant, re-run this workflow with:" |
| 57 | + echo " - variant: one of the variants listed above" |
| 58 | + echo " - operation: your operation string (default: MUL_MAT)" |
| 59 | + echo "==========================================" |
0 commit comments