---
### vibe-infer: Learning GPU Programming with Claude Code
- **URL**: https://blog.vtemian.com/post/vibe-infer/
- **Published**: February 18, 2026
- **Word Count**: 1559 words
- **Tags**: gpu programming, ai tools, webgpu, wgsl, vibe-coding, learning
- **Summary**: Everyone talks about AI-assisted learning. Here's what it actually looks like. From zero WebGPU knowledge to a working MNIST classifier in 155 messages.
Everyone has a story about how AI helped them learn something. "I asked ChatGPT to explain monads and it finally clicked." But these stories are almost always sanitized after the fact. You get the polished takeaway, but you lose the "messy middle"—the confusion, the corrections, and the specific failure modes that actually lead to understanding.
This post is the opposite of the "vibe coding" trend where the AI writes the code and you just ship it. I call this repo [vibe-infer](https://github.com/vtemian/vibe-infer) as a piece of intentional irony. I wrote every single line of GPU code. The AI was my tutor, not my ghostwriter.
This is the receipt: 155 messages, captured in full, from zero WebGPU knowledge to a working MNIST classifier running compute shaders in the browser.
## Why GPU Programming?
GPU programming requires a fundamentally different mental model from writing regular application code. On a CPU, you think sequentially: fetch data, process it, return a result. On a GPU, thousands of threads execute the same instruction simultaneously across different data. You stop thinking about loops and start thinking about thread indices, workgroups, and memory barriers.
[WebGPU](https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API) is the modern browser API for GPU compute. Not just graphics rendering, but general-purpose parallel computation. The shader language is [WGSL](https://www.w3.org/TR/WGSL/), which looks like Rust but with its own type system and execution model. Buffers are raw bytes. There are no arrays in the JavaScript sense. You manage memory layout, type alignment, and dispatch dimensions manually.
I wanted to build a neural network from scratch on the GPU. Not by importing a framework, but by writing every compute shader by hand. Matrix multiplication, ReLU activation, softmax normalization, forward pass chaining. The goal was understanding the machinery, not just producing a working demo.
## The Approach: Claude as Tutor
I used [Claude Code](https://claude.ai/code), Anthropic's agentic coding tool, as a pair programming partner. But the first thing I established was the dynamic: Claude guides, I write. It explains concepts, reviews my code, catches mistakes. It does not write GPU code for me. (I've written a deeper dive into why Claude Code's choice of [MCP for its plugin architecture](https://blog.vtemian.com/post/mcp-is-great-for-tools-terrible-for-agents/) makes it great for tools but presents challenges for more complex agentic behaviors).