Genuinely first principles
Chapter 1 begins with a switch and ends with you having built a working CPU simulator, TOY-100, in Python. Every abstraction above it is constructed, not assumed.
A first-principles course: computers, compilers, GPUs, and the systems that make AI fast.
A first-principles path that takes you from a single transistor to writing production GPU kernels, and then to building an ML compiler of your own.
₹5,999 Launch price, 42% off
The book
Every time a model runs fast, a compiler made a decision. It fused two operators so a tensor never touched DRAM. It picked a tile size that kept the L2 warm. It chose bf16 over fp32 and proved the numerics still held. Those decisions are where most of the performance in modern AI comes from, and almost nobody outside a handful of teams understands how they are made.
This book is the missing curriculum. It starts at the switch, a physical thing that is either on or off, and does not stop until you have designed an intermediate representation, written the optimisation passes that walk it, generated code for a GPU, and benchmarked the result against PyTorch. There is no chapter where you are asked to accept something on faith.
It is deliberately long. A book this size is not padding; it is the honest measure of the gap between "I can train a model" and "I can explain, in cycles, why this kernel falls short of what the roofline says it should achieve." Every chapter carries the same nine sections: a story, the theory, the mathematics, the engineering reality, a performance analysis, a build-it exercise in real code, a debugging guide, interview questions, and the misconceptions that trip people up.
You should be able to write a program in any language. That's it. Python and C++ are taught from scratch where the book needs them, and no prior compilers, CUDA, or machine-learning background is assumed.
What makes it different
Every chapter follows the same nine-part structure, so you always know where the theory ends and the measured reality begins.
Chapter 1 begins with a switch and ends with you having built a working CPU simulator, TOY-100, in Python. Every abstraction above it is constructed, not assumed.
Logic gates, caches, C++, SSA, LLVM, MLIR, tensors, transformers, CUDA, fusion, Triton and FlashAttention. One continuous thread, not nine disconnected books.
A cache simulator in 25 lines. malloc-lite. A bytecode interpreter running real CPython opcodes. A register allocator. And finally, a complete ML compiler.
Roofline, Amdahl, Gustafson, Little's Law, tail percentiles, and the seven ways benchmarks lie, applied to measured numbers rather than hand-waved ones.
TVM, PyTorch Dynamo and Inductor, XLA, IREE, Triton, TensorRT and ONNX Runtime. What each one actually does differently, and why.
Every chapter ends with the questions that get asked at compiler teams, the mistakes that get made in review, and the debugging playbook for when it breaks in production.
Table of contents
Each part assumes only what came before it. Expand any part to see every chapter and the page it starts on.
Sample pages
A free 67-page excerpt: the full table of contents plus complete chapters, exactly as they appear in the book. No email required, no signup.
Readers
This is a first edition, published independently and released recently, so there are no reader reviews here yet, and we'd rather show you nothing than show you something invented.
The table of contents and the free sample are the honest evidence available. Read them, and judge the book on those.
FAQ
Something not covered here? Email laxmenmuralii@gmail.com . Replies usually come the same day.
Within a minute of payment, you receive an email at the address you entered at checkout with access to the full PDF in Google Drive. Access is granted to that specific email address.
Yes. The book is delivered through Google Drive, so you'll need to be signed in to a Google account using the same email address you gave at checkout. If you use a non-Google address, write to us right after purchase and we'll sort out access for you.
All purchases are final. Because the book is delivered in full immediately after payment, orders cannot be cancelled or refunded once access has been granted. The sole exception is a delivery failure that cannot be resolved, in which case a full refund is issued.
No. The book is copyrighted, and sharing, reselling, uploading or redistributing it in any form is prohibited. Your access is tied to your email address and is licensed to you alone.
Check spam and promotions first. If it still isn't there after 10 minutes, email us with your Razorpay payment ID and we'll re-issue access immediately. Every payment is recorded on our side, so nothing is ever lost.
No. The book is built for exactly the opposite case. It starts at logic gates and teaches Python, C++, compiler theory, linear algebra, machine learning and GPU programming as it needs them. If you can write a program in any language, you can read this.
Yes. A free 67-page excerpt is available on this page, with the complete table of contents and full chapters exactly as they appear in the book. No email or signup required.
It's the honest length. The distance between using a model and understanding why it runs at the speed it does spans hardware, systems, languages, compilers, numerics and ML. Any book that covers that in 300 pages is skipping something you'll later have to learn anyway.
Not currently. The book is digital-only, which is also why it can be revised as the field moves.
Yes. Revisions to this edition are free and permanent. The same Drive file is updated in place, so you always see the current version without doing anything.
Use it freely, including in commercial work. The code examples exist to be run and built upon. It is the text, diagrams and the book itself that are copyrighted.
Contact
There is one person behind this store, and he reads every email.
laxmenmuralii@gmail.com
Usually answered same day
Recover your book
Re-issue Drive access instantly
Read the policies
Plain-English, no surprises
If you've paid and something went wrong, include your Razorpay payment ID
(it starts with pay_). That lets us find and fix
your order in seconds.
63 chapters across 9 parts, one download. Delivered to your inbox in about a minute.