Set version to 0.11.6.dev0 (#199) #531
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: Test kernels | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened] # trigger on PRs | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Run tests | |
| runs-on: | |
| group: aws-g6-24xlarge | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| max-parallel: 4 | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| torch-version: ["2.7.0", "2.8.0"] | |
| env: | |
| UV_PYTHON_PREFERENCE: only-managed | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Lock Torch version | |
| run: uv lock --upgrade-package "torch==${{ matrix.torch-version }}" | |
| - name: Install the project | |
| run: uv sync --all-extras --dev | |
| - name: Install setuptools for Triton-based test | |
| run: uv pip install setuptools | |
| - name: Check typing | |
| run: uv run mypy src/kernels | |
| - name: Run tests | |
| run: | | |
| uv run pytest tests | |
| - name: Re-run dependency test with dependencies installed | |
| run: | | |
| uv pip install einops nvidia-cutlass-dsl | |
| uv run pytest tests/test_deps.py | |
| - name: Run staging tests | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_STAGING_TOKEN }} | |
| run: | | |
| HUGGINGFACE_CO_STAGING=true uv run pytest --token -m "is_staging_test" tests/ | |
| if: matrix.python_version == '3.10' && matrix.torch-version == '2.7.0' | |
| - name: Check README generation | |
| # For now, just checks that generation doesn't fail. | |
| run: | | |
| uv run kernels generate-readme kernels-community/triton-layer-norm | |
| - name: Check kernel check | |
| run: | | |
| uv pip install kernel-abi-check | |
| kernels check kernels-community/activation | |
| - name: Import check without torch | |
| run: | | |
| uv pip uninstall torch | |
| python -c "import kernels" |