# "Weekend Experimentπ§ͺ: CUDA Kernel β Mojo π₯"
> **Spoiler alert**: Got it working for some cases, but hit some walls too (probably because I'm a GPU newbie trying to learn Mojo at the same time) π
## π€ What's this about?
I was browsing GitHub and stumbled upon [Microsoft's BitNet repo](https://github.com/microsoft/BitNet). Cool 1-bit neural networks, right? But then I noticed they had this hand-optimized CUDA kernel for `bitlinear_int8xint2` operations.
Being the curious developer I am, I thought...
**"Hmm, I wonder if I could rewrite just this CUDA kernel in Mojo?"**
So I grabbed that specific kernel and spent my weekend trying to make Mojo do the same thing.
*(Okay, full confession: I initially thought "How hard can it be? Maybe I can rewrite the whole thing!" But after diving in... let's just say I got humbled real quick π
)*
Turns out, just this one gnarly GPU kernel was plenty challenging!
**The target**: [This specific CUDA kernel](https://github.com/microsoft/BitNet/tree/main/gpu/bitnet_kernels) (about 120 lines of highly optimized CUDA)
This file has been truncated. show original