Skip to content

Commit b09140f

Browse files
committed
CI: rewire kernel tests
1 parent bdfa7e6 commit b09140f

110 files changed

Lines changed: 308 additions & 443 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

builder/.github/workflows/build_kernel.yaml renamed to .github/workflows/build_kernel.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,39 @@ jobs:
2929
- name: Nix info
3030
run: nix-shell -p nix-info --run "nix-info -m"
3131
- name: Build relu kernel
32-
run: ( cd examples/relu && nix build .\#redistributable.torch29-cxx11-cu126-x86_64-linux )
32+
run: ( cd builder/examples/relu && nix build .\#redistributable.torch29-cxx11-cu126-x86_64-linux )
3333
- name: Copy relu kernel
34-
run: cp -rL examples/relu/result relu-kernel
34+
run: cp -rL builder/examples/relu/result relu-kernel
3535

3636
- name: Build relu kernel (CPU)
37-
run: ( cd examples/relu && nix build .\#redistributable.torch29-cxx11-cpu-x86_64-linux )
37+
run: ( cd builder/examples/relu && nix build .\#redistributable.torch29-cxx11-cpu-x86_64-linux )
3838
- name: Copy relu kernel (CPU)
39-
run: cp -rL examples/relu/result relu-kernel-cpu
39+
run: cp -rL builder/examples/relu/result relu-kernel-cpu
4040

4141
- name: Build cutlass GEMM kernel
42-
run: ( cd examples/cutlass-gemm && nix build .\#redistributable.torch29-cxx11-cu126-x86_64-linux )
42+
run: ( cd builder/examples/cutlass-gemm && nix build .\#redistributable.torch29-cxx11-cu126-x86_64-linux )
4343
- name: Copy cutlass GEMM kernel
44-
run: cp -rL examples/cutlass-gemm/result cutlass-gemm-kernel
44+
run: cp -rL builder/examples/cutlass-gemm/result cutlass-gemm-kernel
4545

4646
- name: Build relu-backprop-compile kernel
47-
run: ( cd examples/relu-backprop-compile && nix build .\#redistributable.torch29-cxx11-cu126-x86_64-linux )
47+
run: ( cd builder/examples/relu-backprop-compile && nix build .\#redistributable.torch29-cxx11-cu126-x86_64-linux )
4848
- name: Copy relu-backprop-compile kernel
49-
run: cp -rL examples/relu-backprop-compile/result relu-backprop-compile-kernel
49+
run: cp -rL builder/examples/relu-backprop-compile/result relu-backprop-compile-kernel
5050

5151
# Just test that we build with the extra torchVersions argument.
5252
- name: Build relu kernel (specific Torch version)
53-
run: ( cd examples/relu-specific-torch && nix build . )
53+
run: ( cd builder/examples/relu-specific-torch && nix build . )
5454

5555
- name: Build relu kernel (compiler flags)
56-
run: ( cd examples/relu-compiler-flags && nix build .\#redistributable.torch29-cxx11-cu126-x86_64-linux )
56+
run: ( cd builder/examples/relu-compiler-flags && nix build .\#redistributable.torch29-cxx11-cu126-x86_64-linux )
5757

5858
- name: Test that we can build a test shell (e.g. that gcc corresponds to CUDA-required)
59-
run: ( cd examples/relu && nix build .#devShells.x86_64-linux.test )
59+
run: ( cd builder/examples/relu && nix build .#devShells.x86_64-linux.test )
6060

6161
- name: Build silu-and-mul kernel
62-
run: ( cd examples/silu-and-mul && nix build .\#redistributable.torch-cuda )
62+
run: ( cd builder/examples/silu-and-mul && nix build .\#redistributable.torch-cuda )
6363
- name: Copy silu-and-mul kernel
64-
run: cp -rL examples/silu-and-mul/result silu-and-mul-kernel
64+
run: cp -rL builder/examples/silu-and-mul/result silu-and-mul-kernel
6565

6666
- name: Upload kernel artifacts
6767
uses: actions/upload-artifact@v6

builder/.github/workflows/build_kernel_macos.yaml renamed to .github/workflows/build_kernel_macos.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
# For now we only test that there are no regressions in building macOS
2626
# kernels. Also run tests once we have a macOS runner.
2727
- name: Build relu kernel
28-
run: ( cd examples/relu && nix build .\#redistributable.torch29-metal-aarch64-darwin -L )
29-
28+
run: ( cd builder/examples/relu && nix build .\#redistributable.torch29-metal-aarch64-darwin -L )
29+
3030
- name: Build relu metal cpp kernel
31-
run: ( cd examples/relu-metal-cpp && nix build .\#redistributable.torch29-metal-aarch64-darwin -L )
31+
run: ( cd builder/examples/relu-metal-cpp && nix build .\#redistributable.torch29-metal-aarch64-darwin -L )

builder/.github/workflows/build_kernel_rocm.yaml renamed to .github/workflows/build_kernel_rocm.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
# For now we only test that there are no regressions in building ROCm
3232
# kernels. Also run tests once we have a ROCm runner.
3333
- name: Build relu kernel
34-
run: ( cd examples/relu && nix build .\#redistributable.torch29-cxx11-rocm63-x86_64-linux -L )
34+
run: ( cd buidler/examples/relu && nix build .\#redistributable.torch29-cxx11-rocm63-x86_64-linux -L )
3535

3636
- name: Build relu kernel (compiler flags)
37-
run: ( cd examples/relu-compiler-flags && nix build .\#redistributable.torch29-cxx11-rocm63-x86_64-linux )
37+
run: ( cd builder/examples/relu-compiler-flags && nix build .\#redistributable.torch29-cxx11-rocm63-x86_64-linux )

builder/.github/workflows/build_kernel_windows.yaml renamed to .github/workflows/build_kernel_windows.yaml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,13 @@ jobs:
6161
run: pip install torch --index-url https://download.pytorch.org/whl/cu${{ matrix.torch.wheel }}
6262

6363
- name: Build cutlass GEMM kernel
64-
run: ( scripts\windows\builder.ps1 -SourceFolder examples/cutlass-gemm -BuildConfig Release -Backend cuda -Build -Force )
65-
# - name: Copy cutlass GEMM kernel
66-
# run: cp -rL examples/cutlass-gemm/result cutlass-gemm-kernel
64+
run: ( builder\scripts\windows\builder.ps1 -SourceFolder builder/examples/cutlass-gemm -BuildConfig Release -Backend cuda -Build -Force )
6765

6866
- name: Build relu kernel
69-
run: ( scripts\windows\builder.ps1 -SourceFolder examples/relu -BuildConfig Release -Backend cuda -Build -Force )
70-
# - name: Copy relu kernel
71-
# run: cp -rL examples/relu/result relu-kernel
67+
run: ( builder\scripts\windows\builder.ps1 -SourceFolder builder/examples/relu -BuildConfig Release -Backend cuda -Build -Force )
7268

7369
- name: Build relu-backprop-compile kernel
74-
run: ( scripts\windows\builder.ps1 -SourceFolder examples/relu-backprop-compile -BuildConfig Release -Backend cuda -Build -Force )
75-
# - name: Copy relu-backprop-compile kernel
76-
# run: cp -rL examples/relu-backprop-compile/result relu-backprop-compile-kernel
77-
78-
# Just test that we build with the extra torchVersions argument.
79-
# - name: Build relu kernel (specific Torch version)
80-
# run: ( cd examples/relu-specific-torch && nix build . )
70+
run: ( builder\scripts\windows\builder.ps1 -SourceFolder builder/examples/relu-backprop-compile -BuildConfig Release -Backend cuda -Build -Force )
8171

8272
- name: Build silu-and-mul kernel
83-
run: ( scripts\windows\builder.ps1 -SourceFolder examples/silu-and-mul -BuildConfig Release -Backend cuda -Build -Force)
73+
run: ( builder\scripts\windows\builder.ps1 -SourceFolder builder/examples/silu-and-mul -BuildConfig Release -Backend cuda -Build -Force)

builder/.github/workflows/build_kernel_xpu.yaml renamed to .github/workflows/build_kernel_xpu.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
# For now we only test that there are no regressions in building XPU
3232
# kernels. Also run tests once we have a XPU runner.
3333
- name: Build relu kernel
34-
run: ( cd examples/relu && nix build .\#redistributable.torch29-cxx11-xpu20252-x86_64-linux -L )
34+
run: ( cd builder/examples/relu && nix build .\#redistributable.torch29-cxx11-xpu20252-x86_64-linux -L )
3535

3636
- name: Build relu kernel (compiler flags)
37-
run: ( cd examples/relu-compiler-flags && nix build .\#redistributable.torch29-cxx11-xpu20252-x86_64-linux )
37+
run: ( cd builder/examples/relu-compiler-flags && nix build .\#redistributable.torch29-cxx11-xpu20252-x86_64-linux )

builder/.github/workflows/check_variants.yaml renamed to .github/workflows/check_variants.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
exit 1
2828
fi
2929
- name: Generate variants Markdown
30-
run: nix run nixpkgs#python3 scripts/gen_variants_markdown.py
30+
run: nix run nixpkgs#python3 builder/scripts/gen_variants_markdown.py
3131
- name: Check if variants Markdown is up-to-date
3232
run: |
33-
if git diff --exit-code docs/build-variants.md; then
33+
if git diff --exit-code builder/docs/build-variants.md; then
3434
echo "✅ docs/build-variants.md is up-to-date"
3535
else
36-
echo "🛑 regenerate docs/build-variants: nix run nixpkgs#python3 scripts/gen_variants_markdown.py"
36+
echo "🛑 regenerate docs/build-variants: nix run nixpkgs#python3 builder/scripts/gen_variants_markdown.py"
3737
exit 1
3838
fi

builder/.github/workflows/docker-build-push.yaml renamed to .github/workflows/docker-build-push.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
- main
77
paths:
88
# Only run on changes to the Dockerfile or workflow file
9-
- "Dockerfile"
10-
- "dockerfiles/**"
9+
- "buidler/Dockerfile"
10+
- "builder/dockerfiles/**"
1111
- ".github/workflows/docker-build-push.yaml"
1212
workflow_dispatch: # Allow manual triggering
1313

@@ -56,7 +56,7 @@ jobs:
5656
uses: docker/build-push-action@v6
5757
with:
5858
context: .
59-
file: ./dockerfiles/Dockerfile.user
59+
file: ./builder/dockerfiles/Dockerfile.user
6060
platforms: linux/amd64,linux/arm64
6161
push: true
6262
tags: ${{ steps.meta.outputs.tags }}
@@ -107,7 +107,7 @@ jobs:
107107
uses: docker/build-push-action@v6
108108
with:
109109
context: .
110-
file: ./dockerfiles/Dockerfile
110+
file: ./builder/dockerfiles/Dockerfile
111111
platforms: linux/amd64,linux/arm64
112112
push: true
113113
tags: ${{ steps.meta-root.outputs.tags }}

builder/.github/workflows/test_extra_commands.yaml renamed to .github/workflows/test_extra_commands.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
env:
2626
USER: runner
2727
- name: Test nix run .#kernels
28-
run: ( cd examples/relu ; nix run .#kernels -- lock ../../tests/run-kernels )
28+
run: ( cd builder/examples/relu ; nix run .#kernels -- lock ../../tests/run-kernels )

builder/examples/cutlass-gemm/flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description = "Flake for CUTLASS gemm test kernel";
33

44
inputs = {
5-
kernel-builder.url = "path:../..";
5+
kernel-builder.url = "path:../../..";
66
};
77

88
outputs =

0 commit comments

Comments
 (0)