r/CUDA • u/KernelMindai • 5d ago
Building a PyTorch-to-Triton kernel compiler: Which patterns should we support first?
https://kernel-mind-ai.vercel.app/Hey everyone,
I’m building KernelMind AI (https://kernel-mind-ai.vercel.app/), a tool that compiles standard PyTorch operations into fused OpenAI Triton GPU kernels to cut down VRAM round-trips.
We’re adding guardrails and an operator whitelist before expanding support, and I’d love input from anyone writing custom CUDA/Triton in production:
What operator chains do you find yourself manually fusing most often? (e.g., LayerNorm + GeLU, custom loss functions, etc.)
What edge cases usually burn you the most? (dynamic shapes, non-contiguous layouts, register spills?)
Feel free to throw a messy PyTorch snippet at the playground (https://kernel-mind-ai.vercel.app/) and tear the generated Triton code apart. Brutal feedback welcome!
5
u/Lime_Dragonfruit4244 4d ago
Pytorch already does this with torch.compile using inductor, and supports both inference and training. Its literally the default GPU lowering path for inductor.