4 releases (breaking)

new 0.4.0 Apr 15, 2025
0.3.0 Apr 10, 2025
0.2.0 Apr 4, 2025
0.1.0 Mar 28, 2025

#182 in Machine learning

Download history 104/week @ 2025-03-25 143/week @ 2025-04-01 165/week @ 2025-04-08

412 downloads per month

Apache-2.0

25KB
318 lines

kernel-builder

This repo contains a Nix package that can be used to build custom machine learning kernels for PyTorch. The kernels are built using the PyTorch C++ Frontend and can be loaded from the Hub with the kernels Python package.

This builder is a core component of the larger kernel build/distribution system.

🚀 Quick Start

We provide a Docker image with which you can build a kernel:

# navigate to the activation directory
cd examples/activation

# then run the following command to build the kernel
docker run --rm \
    -v $(pwd):/kernelcode \
    ghcr.io/huggingface/kernel-builder:latest

This will build the kernel and save the output in the build directory in the activation folder.

📚 Documentation

Credits

The generated CMake build files are based on the vLLM build infrastructure.

Dependencies

~5–12MB
~131K SLoC