3 unstable releases

new 0.2.1 May 8, 2025
0.2.0 Mar 31, 2025
0.1.0 Feb 26, 2025

#228 in Unix APIs

Download history 113/week @ 2025-02-22 45/week @ 2025-03-01 1/week @ 2025-03-08 108/week @ 2025-03-29 15/week @ 2025-04-05 2/week @ 2025-04-12 1/week @ 2025-04-26 95/week @ 2025-05-03

98 downloads per month

Apache-2.0

31KB
781 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

~3–4.5MB
~83K SLoC