Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/build_kernel_macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,5 @@ jobs:
#authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# For now we only test that there are no regressions in building macOS
# kernels. Also run tests once we have a macOS runner.
- name: Build relu kernel
run: ( cd examples/kernels/relu && nix build .\#redistributable.torch211-metal-aarch64-darwin -L )

- name: Build relu metal cpp kernel
run: ( cd examples/kernels/relu-metal-cpp && nix build .\#redistributable.torch211-metal-aarch64-darwin -L )
- name: Build all Metal example kernels
run: nix build -L ./examples/kernels#ci-build-metal
13 changes: 2 additions & 11 deletions .github/workflows/build_kernel_xpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,5 @@ jobs:
run: nix-shell -p nix-info --run "nix-info -m"
# For now we only test that there are no regressions in building XPU
# kernels. Also run tests once we have a XPU runner.
- name: Build relu kernel
run: ( cd examples/kernels/relu && nix build .\#redistributable.torch211-cxx11-xpu20253-x86_64-linux -L )

- name: Build relu tvm-ffi kernel
run: ( cd examples/kernels/relu-tvm-ffi && nix build .\#redistributable.tvm-ffi01-xpu20253-x86_64-linux -L )

- name: Build relu kernel (compiler flags)
run: ( cd examples/kernels/relu-compiler-flags && nix build .\#redistributable.torch211-cxx11-xpu20253-x86_64-linux )

- name: Build cutlass-gemm kernel
run: ( cd examples/kernels/cutlass-gemm && nix build .\#redistributable.torch211-cxx11-xpu20253-x86_64-linux -L )
- name: Build all XPU example kernels
run: nix build -L ./examples/kernels#ci-build-xpu
56 changes: 55 additions & 1 deletion examples/kernels/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

cudaVersion = "cu126";
rocmVersion = "rocm71";
xpuVersion = "xpu20253";
torchVersion = "211";
tvmFfiVersion = "01";

Expand Down Expand Up @@ -194,11 +195,57 @@

ciKernelOutputs = mkKernelOutputs' ciKernels;
ciRocmKernelOutputs = mkKernelOutputs' ciRocmKernels;

# XPU kernels to build in CI.
ciXpuKernels = [
{
name = "relu-kernel";
path = ./relu;
drv =
sys: out: out.packages.${sys}.redistributable.${"torch${torchVersion}-cxx11-${xpuVersion}-${sys}"};
}
{
name = "relu-tvm-ffi-kernel";
path = ./relu-tvm-ffi;
drv =
sys: out: out.packages.${sys}.redistributable.${"tvm-ffi${tvmFfiVersion}-${xpuVersion}-${sys}"};
}
{
name = "relu-compiler-flags";
path = ./relu-compiler-flags;
drv =
sys: out: out.packages.${sys}.redistributable.${"torch${torchVersion}-cxx11-${xpuVersion}-${sys}"};
}
{
name = "cutlass-gemm-kernel";
path = ./cutlass-gemm;
drv =
sys: out: out.packages.${sys}.redistributable.${"torch${torchVersion}-cxx11-${xpuVersion}-${sys}"};
}
];

# Metal kernels to build in CI.
ciMetalKernels = [
{
name = "relu-kernel";
path = ./relu;
drv = sys: out: out.packages.${sys}.redistributable.${"torch${torchVersion}-metal-${sys}"};
}
{
name = "relu-metal-cpp-kernel";
path = ./relu-metal-cpp;
drv = sys: out: out.packages.${sys}.redistributable.${"torch${torchVersion}-metal-${sys}"};
}
];

ciXpuKernelOutputs = mkKernelOutputs' ciXpuKernels;
ciMetalKernelOutputs = mkKernelOutputs' ciMetalKernels;
in
flake-utils.lib.eachSystem
[
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
]
(
system:
Expand Down Expand Up @@ -233,10 +280,17 @@

ci-build-cuda = mkCiBuild "ci-kernels-cuda" ciKernelOutputs;
ci-build-rocm = mkCiBuild "ci-kernels-rocm" ciRocmKernelOutputs;
ci-build-xpu = mkCiBuild "ci-kernels-xpu" ciXpuKernelOutputs;
ci-build-metal = mkCiBuild "ci-kernels-metal" ciMetalKernelOutputs;
in
{
packages = {
inherit ci-build-cuda ci-build-rocm;
inherit
ci-build-cuda
ci-build-rocm
ci-build-xpu
ci-build-metal
;
default = ci-build-cuda;
};
}
Expand Down
Loading