Repository navigation
mlp fused kernel + compiler improvements #16
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install ruff vulture | |
| - name: Format check | |
| run: ruff format --check metile/ tests/ benchmarks/ kernels/ | |
| - name: Lint | |
| run: ruff check metile/ tests/ benchmarks/ kernels/ | |
| - name: Dead code detection | |
| run: | | |
| vulture metile/ kernels/ --min-confidence 90 \ | |
| --exclude "metile/ir/printer.py" \ | |
| --ignore-names "result_type,to_msl,to_msl_mut" | |
| test: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev]" | |
| - name: Run tests | |
| run: python -m pytest tests/ -x -q | |
| benchmark: | |
| runs-on: macos-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev]" | |
| - name: Run benchmarks | |
| run: python benchmarks/regression.py --output bench_results.json | |
| - name: Store benchmark result | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| with: | |
| name: meTile Kernel Performance | |
| tool: customSmallerIsBetter | |
| output-file-path: bench_results.json | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: true | |
| alert-threshold: "115%" | |
| comment-on-alert: true | |
| fail-on-alert: false | |
| benchmark-pr: | |
| runs-on: macos-latest | |
| if: github.event_name == 'pull_request' | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev]" | |
| - name: Run benchmarks | |
| run: python benchmarks/regression.py --output bench_results.json | |
| - name: Compare against baseline | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| with: | |
| name: meTile Kernel Performance | |
| tool: customSmallerIsBetter | |
| output-file-path: bench_results.json | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: false | |
| alert-threshold: "115%" | |
| comment-on-alert: true | |
| fail-on-alert: true |