Skip to content

[Func] Allow proper preservations/reference across copy and pickle #1965

[Func] Allow proper preservations/reference across copy and pickle

[Func] Allow proper preservations/reference across copy and pickle #1965

Workflow file for this run

name: "Build and test kernel"
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened] # trigger on PRs
paths-ignore:
- "docs/**"
- "*.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
build:
permissions:
contents: read
name: Build kernels (${{ matrix.arch }})
strategy:
matrix:
include:
- arch: x86_64-linux
runner: aws-highmemory-32-plus-nix
- arch: aarch64-linux
runner: aws-r8g-8xl-plus-nix
runs-on:
group: ${{ matrix.runner }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23
with:
extra-conf: |
max-jobs = 8
cores = 12
sandbox-fallback = false
- uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
with:
name: huggingface
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
env:
USER: runner
- name: Nix info
run: nix-shell -p nix-info --run "nix-info -m"
- name: Build all example kernels
run: nix build -L ./examples/kernels#ci-build-cuda
- name: Copy kernel artifacts
run: cp -rL result/* .
- name: Upload kernel artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: built-kernels-${{ matrix.arch }}
path: |
activation-kernel
cpp20-symbols-kernel
cutlass-gemm-kernel
cutlass-gemm-tvm-ffi-kernel
relu-kernel
relu-torch-stable-abi-kernel
relu-tvm-ffi-kernel
relu-kernel-cpu
relu-backprop-compile-kernel
relu-triton-kernel
gemm-triton-autotune-kernel
silu-and-mul-kernel
test:
permissions:
contents: read
name: Test kernels (UBI ${{ matrix.ubi_version }})
needs: build
strategy:
matrix:
ubi_version: [8, 9]
runs-on:
group: aws-g6-12xlarge-plus
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Download kernel artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: built-kernels-x86_64-linux
path: .
- name: Build Docker image
run: |
docker build \
-t kernel-builder:ubi${{ matrix.ubi_version }} \
--build-arg UBI_VERSION=${{ matrix.ubi_version }} \
-f nix-builder/tests/Dockerfile.test-kernel .
- name: Run Tests
run: |
docker run --gpus all kernel-builder:ubi${{ matrix.ubi_version }}