autokernel icon indicating copy to clipboard operation
autokernel copied to clipboard

Integration with 🤗 kernels 👋

Open sayakpaul opened this issue 8 months ago • 3 comments

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 :)

sayakpaul avatar Mar 11 '26 13:03 sayakpaul

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

jaberjaber23 avatar Mar 11 '26 23:03 jaberjaber23

Cc: @danieldk

Would collaborating on Slack be more useful? If so, I can create a shared channel.

sayakpaul avatar Mar 12 '26 02:03 sayakpaul

Updated export_hf.py for HF Kernels compatibility. Continuing on Slack.

jaberjaber23 avatar Mar 19 '26 02:03 jaberjaber23