The Largest Open Source Repository of CPU and GPU Kernels Just Went Live
If you've spent any time writing performance-critical code, you know the pain of hand-tuning kernels. It's tedious, error-prone, and often feels like black magic. But what if there was a place where thousands of those kernels already existed, optimized for both CPU and GPU, and it was all open source?
That's exactly what Modular just dropped with their Mojo repository. And yeah, it's already the largest open source collection of CPU and GPU kernels on GitHub. That's not hype, that's a massive time-saver for anyone doing serious compute work.
What It Does
Mojo is a programming language designed for high-performance computing. It combines Python's ease of use with C-level performance, and it's built from the ground up to work seamlessly with accelerators like GPUs.
The repository itself is the core implementation of Mojo, but the star of the show is the sheer volume of kernels included. These are pre-written, optimized routines for common (and not so common) operations. Think matrix multiplications, convolutions, element-wise operations, and more. All tuned for different architectures.
You're not just getting source code either. Each kernel comes with benchmarks, correctness tests, and documentation. It's like having a team of performance engineers hand you their entire playbook.
Why It's Cool
Here's the thing that got me excited: this isn't just a collection of random snippets. The kernels are modular by design. You can pull them out, tweak them, or combine them to build custom operations without starting from scratch.
The other cool part is the consistency. Kernels are tested across multiple hardware platforms, so you know they work on both NVIDIA and AMD GPUs, not to mention various CPU architectures. No more writing something that works on your dev machine but breaks on the CI server.
And because it's Mojo, the code is actually readable. You can understand what each kernel does without diving into five layers of abstraction. That's rare in performance computing, where most optimized code is just a pile of intrinsics.
One killer use case: if you're building an ML framework or a scientific computing library, you can grab these kernels and focus on your actual problem instead of reinventing every inner loop.
How to Try It
Getting started is straightforward. Head over to the Mojo GitHub repo and check out the README. You'll need to install the Modular CLI, which takes about two minutes.
Once that's done, you can browse the kernels directory and start pulling examples right away. I'd recommend starting with a simple vector addition or matrix multiplication kernel, just to see how clean the code is.
curl -s https://get.modular.com | sh
modular install mojo
That's literally it. Then you can run things like mojo run examples/vector_add.mojo and watch the magic happen.
Final Thoughts
I'll be honest, I wasn't expecting much when I first saw this repo. But digging through the kernels changed my mind. This is genuinely useful stuff for anyone doing serious numerical work. The fact that it's all open source and backed by a real company means it's going to keep growing.
If you're tired of writing the same matrix multiply every time you start a new project, or if you're just curious about what high-performance code looks like when it's done right, give this a look. You might end up spending less time optimizing and more time building.
Follow us on Twitter: @githubprojects