Michal Pitr
banner
mptr.bsky.social
Michal Pitr
@mptr.bsky.social
I build code from scratch and write engineering blogs | k8s @ Google | University of Edinburgh

https://open.substack.com/pub/michalpitr
PMPP is a nicely structured introduction to general purpose GPU programming.

GPUs are fundamentally different from CPUs. This impacts the type of workloads that benefit from them.

If you do pick this up, I recommend working through at least some of the exercises.
May 20, 2025 at 1:31 PM
Matrix-matrix multiplication is a fundamental building block of many scientific and ML applications. What does it take to write efficient one?
🧵
May 13, 2025 at 11:04 AM
I've published a new article on CPU-based matrix multiplication optimizations in C.

We'll learn a few things about compilers, read some assembly, and learn about the underlying hardware.

michalpitr.substack.com/p/optimizing...
michalpitr.substack.com
February 15, 2025 at 8:12 PM
Worked my way through Kubernetes The Hard Way yesterday.

Here're a few impressions from someone familiar with K8s internals but not so much with cluster administration:
January 5, 2025 at 4:39 PM
Dev containers are real nice for C++ CUDA projects!

No chance of mismatched gpu driver and cuda toolkit, all dependencies auto installed, clean environment that's isolated from host, and super easy to setup on a new machine.

Gonna be a mainstay for all of my future C++/CUDA projects.
January 3, 2025 at 1:23 PM
Oh wow, got a first pledged subscription to my substack From Scratch.

Not planning to enable payments anytime soon, but it's great to see that folks enjoy my pragmatic engineering deep dives.

#substack #softwareengineering #programming
December 14, 2024 at 1:37 PM
My recent article on creating a container from scratch in a linux terminal popped off and doubled my subscriber count!
December 9, 2024 at 3:28 PM
Reposted by Michal Pitr
How does SQLite store data? https://michalpitr.substack.com/p/how-does-sqlite-store-data
How does SQLite store data?
michalpitr.substack.com
April 9, 2024 at 4:07 PM
Do you understand how Linux containers work? Are cgroups and namespaces just magical blackboxes? Are containers just "light-weight VMs"?

In my latest post, I create a Linux container, step-by-step, using just terminal commands!

#softwareengineering #linux #cloud

open.substack.com/pub/michalpi...
Linux container from scratch
Let's build a minimal container step-by-step in a terminal
open.substack.com
December 7, 2024 at 6:17 PM
Really liked day 3 #AdventOfCode problem! I approached it by writing a simple tokenizer that converts the input file into tokens - identifier, left parenthesis, comma, right paren, number, ..., then looked for legal sequences. Good fun!

adventofcode.com/2024/day/3
Day 3 - Advent of Code 2024
adventofcode.com
December 3, 2024 at 10:19 PM
Ever wondered how to execute code on a GPU?

Wrote a hands-on short post on how to write a simple function that executes on a GPU in C CUDA.

open.substack.com/pub/michalpi...

#softwareengineering #machinelearning #ai #gpgpu
GPU Programming
Writing code for massively parallel processors
open.substack.com
November 28, 2024 at 9:25 AM
Today GKE team celebrated the launch of 65k node clusters!

My favorite bit is that the team had to replace etcd with spanner to overcome scaling issues. ⚡

Curious to see these massive TPU/GPU training clusters in action!
November 26, 2024 at 8:53 PM
Crossed 300 subs on substack!

My publication focuses on intuitive hands-on explanations of complex software topics - usually after I build something like an ML inference engine from scratch.

Why not check it out?

open.substack.com/pub/michalpi...
Build Your Own Inference Engine: From Scratch to "7"
Building a C++ Inference Engine from scratch
open.substack.com
November 19, 2024 at 8:37 PM
Wrote a practical article summarizing what I learned about Linux container filesystems by building a Docker clone from scratch!

We'll reverse engineer how Docker handles it, then discuss overlayfs, and finally use it to setup an Alpine-based container filesystem.

open.substack.com/pub/michalpi...
Primer on Linux container filesystems
Building a container filessytem by hand
open.substack.com
November 16, 2024 at 5:42 PM
Ever wondered how SQLite stores data?

I wrote a hands-on post where I explain how SQLite represents data on disk. I manually navigate the B-Tree with a hex editor to find a specific entry.

Come along!

open.substack.com/pub/michalpi...
How does SQLite store data?
What I learned by implementing (parts) of SQLite from scratch.
open.substack.com
November 14, 2024 at 6:53 PM