8000 GitHub - huggingface/kernel-builder: 👷 Build compute kernels
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

huggingface/kernel-builder

Repository files navigation

kernel-builder

kernel-builder logo

Build and Push Docker Image GitHub tag GitHub package


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.

Torch 2.7 note: kernel-builder currently builds Torch 2.7 extensions based on the final release candidate. If you upload kernels Torch 2.7 kernels, please validate them against the final Torch 2.7.0 release. In the unlikely case of an ABI-breaking change, you can rebuild and upload a your kernel once kernel-builder is updated for the final release.

🚀 Quick Start

We provide Docker containers for building kernels. For a quick build:

# Using the prebuilt container
docker run --mount type=bind,source=$(pwd),target=/kernelcode ghcr.io/huggingface/kernel-builder:{SHA}

or build the container locally:

docker build -t kernel-builder:local -f dockerfiles/Dockerfile .
docker run --mount type=bind,source=$(pwd),target=/kernelcode kernel-builder:local

See dockerfiles/README.md for more options, including a user-level container for CI/CD environments.

📚 Documentation

Credits

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

About

👷 Build compute kernels

Resources

Stars

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  
0