Integration with 🤗 kernels 👋
Hello folks,
I am Sayak, part of the Kernels team at Hugging Face.
Great work here. Actually, we previously worked on a guided agent to do kernels for a video generation model and got decent results: https://huggingface.co/blog/custom-cuda-kernels-agent-skills.
But this work is much more mature in its scope. We wanted to know if you'd be interested in collaborating us to get the generated kernels on the Hub and make them kernels compatible so that users can do module = get_kernel("rightnow-ai/coolest-kernel") and get started right away.
Let me know :)
Hey Sayak, thanks for reaching out. We'd be interested in collaborating.
We added an export_hf.py tool that extracts CUDA source from our optimized kernels and generates the HF Kernels project structure (build.toml, torch_binding.cpp, init.py). It handles both CUDA C++ and Triton backends.
One thing we realized: the export generates the source layout but actually publishing to the Hub requires the full Nix build pipeline to cross-compile for all PyTorch/CUDA/ABI combinations. Our tool gets you to the starting line but not across it without kernel-builder and Nix.
Would love your team's help bridging that gap. If there's a simpler path to get kernels on the Hub (or if kernel-builder can be run as a service), that would make the integration much more practical for our users.
The code is live on main if you want to take a look: https://github.com/RightNow-AI/autokernel/blob/main/export_hf.py
Cc: @danieldk
Would collaborating on Slack be more useful? If so, I can create a shared channel.
Updated export_hf.py for HF Kernels compatibility. Continuing on Slack.