This repository was archived by the owner on Apr 6, 2026. It is now read-only.
Select default shells from available variants (#247) #570
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: "Build and test kernel" | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened] # trigger on PRs | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build kernel | |
| runs-on: | |
| group: aws-g6-12xlarge-plus | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: huggingface | |
| #authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
| env: | |
| USER: github_runner | |
| - name: Build activation kernel | |
| run: ( cd examples/activation && nix build .\#redistributable.torch27-cxx11-cu126-x86_64-linux ) | |
| - name: Copy activation kernel | |
| run: cp -rL examples/activation/result activation-kernel | |
| - name: Build cutlass GEMM kernel | |
| run: ( cd examples/cutlass-gemm && nix build .\#redistributable.torch27-cxx11-cu126-x86_64-linux ) | |
| - name: Copy cutlass GEMM kernel | |
| run: cp -rL examples/cutlass-gemm/result cutlass-gemm-kernel | |
| - name: Build relu kernel | |
| run: ( cd examples/relu && nix build .\#redistributable.torch27-cxx11-cu126-x86_64-linux ) | |
| - name: Copy relu kernel | |
| run: cp -rL examples/relu/result relu-kernel | |
| - name: Build relu-backprop-compile kernel | |
| run: ( cd examples/relu-backprop-compile && nix build .\#redistributable.torch27-cxx11-cu126-x86_64-linux ) | |
| - name: Copy relu-backprop-compile kernel | |
| run: cp -rL examples/relu-backprop-compile/result relu-backprop-compile-kernel | |
| # Just test that we build with the extra torchVersions argument. | |
| - name: Build relu kernel (specific Torch version) | |
| run: ( cd examples/relu-specific-torch && nix build . ) | |
| - name: Test that we can build a test shell (e.g. that gcc corresponds to CUDA-required) | |
| run: ( cd examples/relu && nix build .#devShells.x86_64-linux.test ) | |
| - name: Build silu-and-mul-universal kernel | |
| run: ( cd examples/silu-and-mul-universal && nix build .\#redistributable.torch27-cxx11-cu126-x86_64-linux ) | |
| - name: Copy silu-and-mul-universal kernel | |
| run: cp -rL examples/silu-and-mul-universal/result silu-and-mul-universal-kernel | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: tests/Dockerfile.test-kernel | |
| platforms: linux/amd64 | |
| load: true | |
| push: false | |
| tags: kernel-builder:latest | |
| - name: Run Tests | |
| run: | | |
| docker run --gpus all kernel-builder:latest |