ci: pass absolute patch paths to apply.sh #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: MLX PR check (fork) | |
| # RUN DÉCISIF — MLX_METAL_JIT=OFF | |
| # Delta vs la tête de la PR : exactement UNE ligne (backends/mlx/CMakeLists.txt:215, | |
| # via jit-off.patch). Objectif : confirmer ou réfuter que le kernel JIT Metal | |
| # est la cause du max_diff=33.0089 sur gather_mm(sorted=True). | |
| # | |
| # À placer en .github/workflows/mlx-fork-check.yml sur la branche ci-mlx-check. | |
| # NE JAMAIS inclure ce fichier ni jit-off.patch dans la PR upstream. | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - ci-mlx-check | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-mlx-moe: | |
| runs-on: macos-14 | |
| timeout-minutes: 300 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| # ------------------------------------------------------------------ | |
| # PREUVES — à screenshoter/lier dans le commentaire PR : | |
| # le flag réellement compilé, et le commit exact. | |
| # ------------------------------------------------------------------ | |
| - name: Preuve — flag JIT et commit | |
| run: | | |
| set -eux | |
| git log --oneline -3 | |
| grep -n "MLX_METAL_JIT" backends/mlx/CMakeLists.txt | |
| # attendu : -DMLX_METAL_JIT=OFF (sinon, le patch n'est pas appliqué -> STOP) | |
| grep -q "MLX_METAL_JIT=OFF" backends/mlx/CMakeLists.txt | |
| uname -m | |
| xcrun -sdk macosx metal --version || true | |
| - name: Install ExecuTorch | |
| run: | | |
| set -eux | |
| python -m pip install --upgrade pip | |
| python install_executorch.py | |
| - name: Configure (preset mlx-release) | |
| run: | | |
| set -eux | |
| cmake --preset mlx-release \ | |
| -DEXECUTORCH_BUILD_TESTS=ON \ | |
| -DEXECUTORCH_MLX_ENABLE_SANITIZERS=OFF | |
| - name: Build op_test_runner | |
| id: build | |
| run: | | |
| set -eux | |
| # NB : avec JIT=OFF, MLX compile TOUS les kernels Metal en AOT. | |
| # Build plus long qu'en JIT=ON (souvent +10 à 25 min). | |
| cmake --build cmake-out --target op_test_runner -j2 | |
| df -h / | |
| - name: Preuve — metallib AOT | |
| if: steps.build.outcome == 'success' | |
| run: | | |
| set -eux | |
| # Empreinte du mode : la metallib JIT=OFF (tous kernels AOT) est | |
| # nettement plus grosse que la metallib JIT=ON. | |
| find cmake-out -name "*.metallib" -exec ls -la {} \; | |
| # ------------------------------------------------------------------ | |
| # LE VERDICT : les 2 configs qui échouaient en JIT=ON. | |
| # ------------------------------------------------------------------ | |
| - name: VERDICT — gather_mm / gather_qmm (sorted incl.) | |
| if: steps.build.outcome == 'success' | |
| continue-on-error: true | |
| run: | | |
| set -eux | |
| python -m executorch.backends.mlx.test.run_all_tests \ | |
| gather_mm gather_qmm -v --clean-after | |
| # Valide aussi le fix mémo (les 3 configs statiques scatter, IfNode: 0). | |
| - name: MoE — moe_gather_inputs / moe_scatter_outputs | |
| if: steps.build.outcome == 'success' | |
| continue-on-error: true | |
| run: | | |
| set -eux | |
| python -m executorch.backends.mlx.test.run_all_tests \ | |
| moe_gather_inputs moe_scatter_outputs -v --clean-after | |
| - name: Tests Python non-runtime | |
| if: steps.build.outcome == 'success' | |
| continue-on-error: true | |
| run: | | |
| set -eux | |
| python -m pytest \ | |
| backends/mlx/test/test_passes.py \ | |
| backends/mlx/test/test_partitioner.py \ | |
| backends/mlx/test/test_serialization_dedup.py \ | |
| -v | |
| - name: Diagnostics finaux | |
| if: always() | |
| run: df -h / |