sdkit¶
Post from Nov 05, 2025
This post concludes (for now) my ongoing deep-dive into ML compilers, while researching for sdkit v3. I've linked (at the end) to some of the papers that I read related to graph execution on GPUs.
Post from Oct 27, 2025
A possible intuition for understanding GPU memory hierarchy (and the performance penalty for data transfer between various layers) is to think of it like a manufacturing logistics problem:
- CPU (host) to GPU (device) is like travelling overnight between two cities. The CPU city is like the "headquarters", and contains a mega-sized warehouse of parts (think football field sizes), also known as 'Host memory'.
- Each GPU is like a different city, containing its own warehouse outside the city, also known as 'Global Memory'. This warehouse stockpiles whatever it needs from the headquarters city (CPU).
- Each SM/Core/Tile is a factory located in different areas of the city. Each factory contains a small warehouse for stockpiling whatever inventory it needs, also known as 'Shared Memory'.
- Each warp is a bulk stamping machine inside the factory, producing 32 items in one shot. There's a tray next to each machine, also known as 'Registers'. This tray is used for keeping stuff temporarily for each stamping process.
Post from Oct 24, 2025
Good post on using MLIR for compiling ML models to GPUs. It gives a good broad overview of a GPU architecture, and how MLIR fits into that. The overall series looks pretty interesting too!
Post from Oct 10, 2025
Some notes on machine-learning compilers, gathered while researching tech for Easy Diffusion's next engine (i.e. sdkit v3). For context, see the design constraints of the new engine.
Post from Oct 10, 2025
The design constraints for Easy Diffusion's next engine (i.e. sdkit v3) are:
- Lean: Install size of < 200 MB uncompressed (excluding models).
- Fast: Performance within 10% of the best-possible speed on that GPU for that model.
- Capable: Supports Stable Diffusion 1.x, 2.x, 3.x, XL, Flux, Chroma, ControlNet, LORA, Embedding, VAE. Supports loading custom model weights (from civitai etc), and memory offloading (for smaller GPUs).
- Targets: Desktops and Laptops, Windows/Linux/Mac, NVIDIA/AMD/Intel/Apple.
Post from Feb 10, 2025
Easy Diffusion (and sdkit) now also support AMD on Windows automatically (using DirectML), thanks to integrating with torchruntime. It also supports integrated GPUs (Intel and AMD) on Windows, making Easy Diffusion faster on PCs without dedicated graphics cards.
Post from Feb 10, 2025
Spent the last week or two getting torchruntime fully integrated into Easy Diffusion, and making sure that it handles all the edge-cases.
Post from Jan 28, 2025
Continued to test and fix issues in sdkit, after the change to support DirectML. The change is fairly intrusive, since it removes direct references to torch.cuda with a layer of abstraction.
Post from Jan 27, 2025
Worked on adding support for DirectML in sdkit. This allows AMD GPUs and Integrated GPUs to generate images on Windows.