huggingface/kernels
Build compute kernels and load them from the Hub.
https://skillcdn.ai/gh/huggingface/kernelsConnect this address to your AI to use these skills. How to connect
- Unverified
- Default branch
main - Commit
4ede10a - License
Apache-2.0 - Searchwords
Explore this repository
Searches the original text of skills and documents, and the translations of skills when you search in their language.
Documents
- Develop kernels with agentsCode agents are a good fit to build custom kernels because the hard part is not just writing in Domain Specific Language (DSLs) like CUDA. You also need the right project layout, PyTorch bindings, ar…docs/source/builder/agents-guide.md
- Build variantsA kernel can be compliant for a specific compute framework (e.g. CUDA) or architecture (e.g. x86_64). For compliance with a compute framework and architecture combination, all the build variants list…docs/source/builder/build-variants.md
- Build with NixThe kernel builder uses Nix for building kernels. You can build or run the kernels directly if you have Nix installed on your system. We recommend installing Nix in the following way:docs/source/builder/build.md
- Nix builder designkernel-builder uses a Nix-based builder that orchestrates the build. The Nix builder provides:docs/source/builder/design-nix-builder.md
- Architecture overviewThe Kernel Builder is a Nix flake that combines two components:docs/source/builder/design-overview.md
- Building and testing kernels with GitHub ActionsCompiling a kernel is CPU-intensive and testing it requires an accelerator (such as a GPU), two things that GitHub's standard runners do not provide cheaply. Instead of maintaining self-hosted runner…docs/source/builder/github-actions.md
- Set up your IDELanguage servers do not interpret build.toml, so IDE completion for CUDA, ROCm, framework headers, and the kernel's Python wrapper does not work out of the box. This guide shows how to configure VS C…docs/source/builder/ide-setup.md
- Develop locallykernel-builder builds kernels in a sandbox. This has various benefits, such as building kernels for a wide range of Torch versions, compatibility with older C library versions and avoiding accidental…docs/source/builder/local-dev.md
- Set up for Metal kernelsInstructions on this page assume that you installed Nix with the Determinate Nix installer.docs/source/builder/metal.md
- Secure your kernelsAs a kernel builder, you provide code that might be run on thousands or even millions of machines. This comes with the responsibility of ensuring no malicious code is distributed.docs/source/builder/security.md
- Ship Triton autotune configurationsTriton kernels typically have parameters, such as tile sizes, number of warps and number of pipeline stages, whose optimal values depend on the GPU and the problem shape. Autotuning finds good values…docs/source/builder/triton-autotune.md
- Why Nix?The Kernel Builder project uses Nix to build custom kernels designed specifically for PyTorch.docs/source/builder/why-nix.md
- Write kernelsThe Kernel Hub allows Python libraries and applications to load compute kernels directly from the Hub. To support this kind of dynamic loading, Hub kernels differ from traditional Python kernel packa…docs/source/builder/writing-kernels.md
Skipped (8)
These manifests were not served. Fix them and push: the next commit is indexed again.
kernel-builder/skills/rocm-kernels/SKILL.mdlink_missing4 links name no file of the repository (references/skill-evaluation-methodology.md, references/kernel-agent-knowledge-base.md, scripts/sweep_num_warps.py, ...)kernel-builder/skills/triton-kernels/SKILL.mdmissing_front_matterSKILL.md must start with YAML front-matterdocs/source/builder/design-overview.mdlink_missinga link names no file of the repository (./design-nix-builder)docs/source/builder/security.mdlink_missinga link names no file of the repository (kernel-requirements.md)docs/source/builder/writing-kernels.mdlink_missinga link names no file of the repository (nix.md)docs/source/kernel-requirements.mdlink_missinga link names no file of the repository (builder/build-variants)kernel-builder/skills/cuda-kernels/references/diffusers-h100.mdlink_missing6 links name no file of the repository (references/diffusers-integration.md, references/troubleshooting.md, references/kernel-templates.md, ...)kernel-builder/skills/cuda-kernels/references/diffusers-integration.mdlink_missinga link names no file of the repository (ltx_kernel_injection_example.py)