v0.14.0
New features
Kernel repo type
Kernels are now a separate repository type on the Hub. This brings many usability improvements to kernels. For example, you can view all kernels that are hosted on the Hub on the kernel overview page:
https://huggingface.co/kernels
This page allows you to filter kernels by supported backends (CUDA, XPU, Metal, etc.) and specific accelerators such as NVIDIA H100 or Apple M5 Max. The page for a kernel will also show the supported accelerators, operating systems, architectures and Torch versions. For instance, the flash-attn2 page shows all supported hardware and architectures:
https://huggingface.co/kernels/kernels-community/flash-attn2
Starting with kernels 0.14, we only support the new kernel repository type. If you would like to upload kernels to the Hub, you can request support for kernel repositories for your user or organization under Settings -> Account.
Kernel metadata
Kernels have had support for optional metadata to state dependencies, etc. However, we have made including metadata mandatory. This allows users of kernels to query metadata such as the kernel's license and name. But it also made it possible to load kernels by their unique identifier that is also used in their Torch ops name. This makes it easier to debug kernels, since the dynamically loaded name corresponds to the operator name.
We have also added support for querying metadata of kernels that have been loaded:
>>> for kernel in kernels.get_loaded_kernels():
... metadata = kernel.metadata
... repo_info = kernel.repo_info
... print(metadata.id, repo_info.repo_id, metadata.backend.backend_type)
_relu_metal_c835f43 kernels-community/relu metalTrusted publishers
To improve security and restrict loading of arbitrary code, kernels will by default only load kernels from trusted publishers. To load other kernels, use the trust_remote_code option:
get_kernel("some-other-org/my-kernel", version=1, trust_remote_code=True)Torch 2.12 support
This release adds support for Torch 2.12, currently based on RC9. The main branch will be updated with the final release when it is available, but there are typically no ABI changes in (late) release candidates, so building kernels with RC9 should also work on the final release.
What's Changed
- trigger documentation builds on release branches. by @sayakpaul in #445
- Make all Rust crates part of a single Cargo workspace by @danieldk in #446
- python3Packages.nvidia-cutlass-dsl-libs: fix missing lib arg by @danieldk in #448
- feat:
get_loaded_kernels()by @cbensimon in #428 - [Fix][XPU]: resolve executable stack (RWE) security issue in binaries and bump sycl-tla to v0.8 by @YangKai0616 in #449
- deprecation for version and revision check. by @sayakpaul in #450
- feat: default to uploading kernel repo type by @drbh in #447
- nix-builder: update ROCm 7.2.1 hashes by @danieldk in #451
- Add ROCM kernel skill by @01xjw in #343
- CI: update and pin cachix action by @danieldk in #453
- chore: bump doc-builder SHA for PR upload workflow by @rtrompier in #457
- move skills to builder. by @sayakpaul in #456
- feat: resolve repo type and fetch accordingly by @drbh in #435
- [ci] build for the latest variant. by @sayakpaul in #466
- kernel-builder: detect card in
result,build, or target dir by @danieldk in #464 - auto generate kernel-builder cli docs. by @sayakpaul in #463
- clean docs by removing stuff that don't belong to the kernel client cli by @sayakpaul in #460
- fix source resolution in docs. by @sayakpaul in #467
- [docs] fix source resolution again by @sayakpaul in #472
- Move card filling to Nix by @danieldk in #470
- feat: make license lowercase by @drbh in #474
- kernels: remove vendored RST to MDX by @danieldk in #476
- Prefer ruff formatting by @drbh in #462
- [core] package kernels-data as a python wrapper. by @sayakpaul in #475
- nix: avoid constant rebuilds of kernel-builder/kernel-abi-check by @danieldk in #478
- python3Packages.kernels-data: init by @danieldk in #479
- kernels-data: add and expose supported backend archs by @danieldk in #480
- Remove unneeded backward compat by @drbh in #473
- kernels-data: allow unknown fields in
Metadataby @danieldk in #481 - ci: run Nix checks on our own runner to avoid out of disk space by @danieldk in #482
- kernel-builder: use branch from
build.tomlwhen specified by @danieldk in #485 - [Fix] Rename remaining CUTLASS references to sycl-tla in XPU templates and nix by @YangKai0616 in #492
- Revamp metadata writing and add kernel id by @danieldk in #471
- Set the version to 0.14.0.dev0 by @danieldk in #443
- kernels-data: skip serializing archs when
Noneby @danieldk in #493 - [Fix] Auto-detect Python executable in cmake utils by @YangKai0616 in #491
- Build Python 3.13t + 3.14t wheels of PyO3 packages by @danieldk in #495
- feat: add test and docs for get_loaded_kernels. by @sayakpaul in #490
- Fix failing tests by @sayakpaul in #497
- Add
make pin-actionstarget to pin all GitHub actions by @danieldk in #498 - feat: include layer usage examples in the card. by @sayakpaul in #500
- [DOCS] guide for using agents by @burtenshaw in #459
- Fix an issue with Windows ARM64 free threaded builds by @danieldk in #501
- nix-builder: nvidia-cutlass-dsl requires Linux by @danieldk in #488
- [feat] Make utils release by @sayakpaul in #496
- kernels: use
Metadatafromkernels-databy @danieldk in #499 - Add issue and pr templates by @drbh in #509
- feat: prefer using hf hub library by @drbh in #511
- Fix update tests for kernel data lib and path and add ci rust tests by @drbh in #514
- fix: avoid leading separator in user_agent when no caller-supplied agent is provided by @MedChaouch in #510
- Remove non-HF repos from docs/tests by @danieldk in #515
- feat: upload progress bar by @drbh in #410
- ci: update doc builder workflows by @danieldk in #517
- ci: also update PR upload action by @danieldk in #518
- kernel-builder: fix failed uploads trying to remove directories by @danieldk in #516
- feat: add trusted orgs and flag by @drbh in #512
- docs: refresh for native kernel repo type on the Hub by @gary149 in #520
- Add support for Torch 2.12 by @danieldk in #505
- kernel-builder: raise C++ standard level to C++20 by @danieldk in #522
New Contributors
- @cbensimon made their first contribution in #428
- @01xjw made their first contribution in #343
- @rtrompier made their first contribution in #457
- @MedChaouch made their first contribution in #510
- @gary149 made their first contribution in #520
Full Changelog: v0.13.0...v0.14.0