Skip to content

v0.19.0

Latest

Choose a tag to compare

@github-actions github-actions released this 23 Nov 08:45
· 0 commits to main since this release

New features

MLX kernels on Apple Silicon

kernels and kernel-builder now support the MLX framework for noarch (JIT) kernels. For example:

[general]
name = "my-mlx-kernel"
version = 1
edition = 6
license = "Apache-2.0"
backends = ["metal"]

[mlx-noarch]

Currently, only the metal backend is supported. See the MLX ReLU example for a complete kernel.

Experimental support for CUDA kernels in Rust

kernel-builder now has experimental support for building CUDA kernels in Rust. Both cuda-oxide and cutile-rs are supported. See the ReLU examples for cuda-oxide and cutile-rs on how to use the new support for Rust CUDA kernels.

ZIP packaging for large kernels

Kernel authors can opt into the new ZIP build layout in build.toml:

[general]
build-layout = "zip"

This layout stores Python and data files in a ZIP archive. This can be helpful to avoid download rate limits for kernels that ship a lot of files. Warning: kernels that use this layout cannot be loaded on kernels versions prior to 0.19.0.

See the section on reading data files for more information on how to read data files, such as Triton autotune files, in this kernel layout.

More ways to port kernels

kernel-port recipes can now apply structural rewrites, adapt native extensions to use ._ops, and rewrite imports to use kernel-kernel dependencies. The tool also checks relative imports and Torch extension declarations at the end of a port, so recipes can catch some upstream changes before the build.

Dependency trees in kernels info

Use --dep-tree to see a kernels transitive (kernel-kernel) dependencies:

kernels info --dep-tree <repo_id_or_path>

Combine this new option with --json to get a machine-parseable dependency tree (dependency_tree in the output).

Parallel HIP compilation

The Nix builder now uses a hook to parallelize ROCm kernel builds when a kernel is built for multiple archs. This works similar to the --threads option of nvcc and can speed up the build several times.

What's Changed

  • Set version to 0.19.0.dev0 by @danieldk in #947
  • python3Packages.torch_215: update to 2.15.0 (final) by @danieldk in #948
  • nix-builder: improvements in NCCL handling by @danieldk in #951
  • nix-builder: skip nvvm copy in ptxas override when absent by @drbh in #954
  • Accept older ROCm minor versions within the same major by @Abdennacer-Badaoui in #959
  • ci: try to fix API changes lint by @danieldk in #960
  • kernel-abi-check: refresh vendored ABI symbol files by @hf-kernels-bot[bot] in #958
  • nix-builder: system-flatten versions before genKernelFlakeOutputs by @danieldk in #953
  • fix: reuse open upload pr instead of opening duplicates by @drbh in #912
  • Fix an eyre warning by @danieldk in #964
  • Vouch for paulpak58 by @danieldk in #965
  • kernels-common: stream files during hashing to reduce peak memory by @nrenvo in #955
  • feat: support rust gpu by @drbh in #928
  • kernels: fix envvar leakage into kernels cache ls test by @danieldk in #967
  • kernels: make sigstore optional again by @danieldk in #966
  • fix: drop transformers 5.3.0 override by @drbh in #984
  • kernel-builder: add support for the rust-cutile language by @danieldk in #978
  • feat: extend kernel port tool operations by @drbh in #946
  • Map torch.device("cuda") to rocm on ROCm platforms in kernelize by @Abdennacer-Badaoui in #969
  • kernels: allow dotted versions in variants, add Python ABI by @danieldk in #985
  • [Func] Avoid recompiles on id by @vasqu in #927
  • kernels: add SDK variants by @danieldk in #987
  • kernels: refine Python ABI encoding in variants by @danieldk in #993
  • ci: build abi3t wheels, move abi3 to Python 3.10 by @danieldk in #963
  • kernel-abi-check: refresh vendored ABI symbol files by @hf-kernels-bot[bot] in #977
  • fix: parse rocm714 legacy variants as rocm 7.14 by @drbh in #996
  • kernels: propagate check_arch where relevant. by @sayakpaul in #992
  • kernels: add an opt in flag to always load latest version by @sayakpaul in #1001
  • kernel-abi-check: check symbols stripped with --strip-unneeded by @danieldk in #1002
  • [Darwin installation bug] Passing extra-conf to determinate nix installer by @ariG23498 in #1007
  • nix-builder add support for SDKs by @danieldk in #1003
  • kernel-builder: add testing of metal kernels by @sayakpaul in #1009
  • kernels: propagate hf auth errors better by @sayakpaul in #1010
  • [docs]: remove dirty mention from readme. by @sayakpaul in #1008
  • kernel-abi-check: refresh vendored ABI symbol files by @hf-kernels-bot[bot] in #1005
  • ci: better clarification of the PR workflow, docs must be human-written by @danieldk in #1013
  • treewide: add support for MLX noarch kernels by @danieldk in #999
  • fix: command buffer race with relu metal cpp example by @EricLBuehler in #1014
  • lock-kernel-deps: do not use environment Python by @danieldk in #1015
  • flake: remove lib.genFlakeOutputs by @danieldk in #1012
  • genFlakeOutputs: add formatter output by @danieldk in #1011
  • kernels: add an option to print dependency trees in kernels info. by @sayakpaul in #1016
  • nix-builder: emulate nvcc's -threads for HIP clang by @danieldk in #998
  • kernel-port: support kernel-kernel dependencies by @danieldk in #1018
  • kernel-port: extend manifest options by @danieldk in #1019
  • nix-builder: enable metal for mlx nix builds through mlx wheels by @EricLBuehler in #1022
  • nix-builder: hip-offload-jobs-hook -> hipcc-threads-hook by @danieldk in #1025
  • treewide: add support for loading Python files from a ZIP file by @danieldk in #1024
  • build(deps): bump the actions group across 1 directory with 12 updates by @dependabot[bot] in #1004
  • fix: create version branches empty to avoid upload races by @drbh in #1028
  • kernel-builder: add docs for mlx in the frameworks section. by @sayakpaul in #1030
  • feat: add bfl sdpa kernel examples for mlx and torch by @EricLBuehler in #1029
  • kernels: remove MLX noarch backend version again by @danieldk in #1031
  • ci: move all nix-builder tests to nix-builder/tests by @danieldk in #1032
  • kernels: move internal APIs to _internals by @danieldk in #1027
  • Small Rust kernel support refinements by @danieldk in #1033
  • nix-builder: allow access to metal device during mlx builds by @EricLBuehler in #1034
  • docs: use prettier to standardize doc formatting by @danieldk in #1035

New Contributors

Full Changelog: v0.18.0...v0.19.0