huggingface/kernels
Build compute kernels and load them from the Hub.
What it solves
It provides a way for Python libraries and applications to dynamically load optimized compute kernels directly from the Hugging Face Hub, bypassing the need for traditional Python package installations and PYTHONPATH restrictions.
How it works
The project consists of a Python package (kernels) that allows users to download and execute specific versions of kernels from the Hub. For developers, it includes a kernel-builder tool to create these portable, compatible kernels. These kernels are designed to be portable across different Python versions, PyTorch build configurations, and various hardware backends.
Who it’s for
- AI Developers: Who want to use high-performance, optimized compute kernels without managing complex installation processes.
- Kernel Authors: Who need a tool to build and distribute portable kernels that work across multiple hardware architectures and software environments.
Highlights
- Dynamic Loading: Load kernels from the Hub without requiring them to be in the
PYTHONPATH. - Version Control: Support for loading multiple versions of the same kernel within a single Python process.
- Broad Hardware Support: Support for CUDA, CPU, ROCm, XPU, Metal, TPU, and others across different support tiers.
- Portable Compatibility: Designed to work across various PyTorch build configurations and C++ ABIs.
Related
- Dispatch
- Dispatch
- Dispatch
- Project
- Dispatch