LLM Training: The End-to-End Flow

What each step of an LLM training iteration computes, what it costs in memory and arithmetic, and where the loop stalls on real hardware.

August 10, 2026 · 19 min · Sandeep Kumar

Cache Coherence Demystified: The MESI Protocol on Intel Granite Rapids

Deep dive into cache coherence and the MESI protocol on a 256-core Intel Granite Rapids system: microbenchmarks for ping-pong latency, false sharing, atomic contention, and lock primitives.

March 3, 2026 · 25 min · Sandeep Kumar

Everything on Precision: Numeric Formats in Modern ML and HPC

A walkthrough of numeric formats that matter today — FP32, TF32, FP16, BF16, FP8, INT8, INT4 — how they behave, when to use each, and where the pitfalls hide.

March 3, 2026 · 13 min · Sandeep Kumar

LLM Inference Introduction: the end-to-end flow and vector math

LLM Basic

February 10, 2026 · 13 min · Sandeep Kumar

Understanding Linux perf: stat and record

What really happens in the kernel when you run perf stat or perf record.

December 4, 2025 · 8 min · Sandeep Kumar

Fat File System

In this post, we discuss the internals of a FAT based file system. FAT stands for File Allocation Table, which is also the name of the central data structure of this design. It is one of the oldest file system designs still in use – your pen drive is probably formatted with some variant of it (FAT32 or exFAT). The layout A FAT file system has a fairly simple on-disk layout: ...

May 16, 2020 · 5 min · Sandeep Kumar

Library Calling in C

In this post we are exploring how different types of binaries are generated, how function calls work when code is split across multiple files, and how the toolchain (compiler, linker, loader) helps. We’ll also cover how to build and install a custom libc for testing and debugging purposes. File Types and High-Level Flow Difference in types of files: .c / .cpp: source files .o: object files (compiled but not yet linked) .a: static library (archive of .o files) .so: shared library (dynamically linked at runtime) Typical build pipeline: ...

May 1, 2019 · 9 min · Sandeep Kumar

The KV Cache: Sizing It, and the Attention Variants That Shrink It

What the KV cache costs per token, and how MQA, GQA and MLA rewrite attention to make that number smaller.

August 12, 2026 · 10 min · Sandeep Kumar

Tiling and Collective Operations

The two data-movement primitives behind training performance: tiling inside a device, collectives between devices.

August 12, 2026 · 17 min · Sandeep Kumar

VNNI Data Layout for Intel AMX Matrix Multiplication

A technical tutorial on Intel AMX matrix multiplication, the VNNI layout requirement, its silent correctness failure mode, and LIBXSMM dispatch.

March 8, 2026 · 14 min · Sandeep Kumar

Adding a counter to the *proc* interface

A practical guide to instrumenting the Linux kernel by adding custom counters to /proc/vmstat

April 8, 2021 · 9 min · Sandeep Kumar

Inode File system

In this post, we are going to discuss the internals of an inode based file system. There are different variants of inode: i-node, I-node, and, of course, inode. We are going to be using “inode” for this post. What is an inode? Inode is a data structure, used by modern file systems, such as ext4, to track the contents of a file across the disk. An inode is associated with every file and directory. Technically, from the point of view of a file system, there is no difference between the inode of a file or a directory. They are basically the same, with a flag in the inode stating whether it is pointing to a file or a directory. ...

May 16, 2020 · 3 min · Sandeep Kumar

Installing custom LibC

Glibc is the standard library that is linked against all the linux applications. It provides the necessary functionality like printf. It also provides wrappers for most used system calls like open, read, write, close. Manually building and installing libc. Example from a StackOverflow answer export glibc_install="$(pwd)/glibc/build/install" git clone git://sourceware.org/git/glibc.git cd glibc git checkout glibc-2.28 mkdir build cd build ../configure --prefix "$glibc_install" make make install Followed by a test c code ...

March 9, 2020 · 4 min · Sandeep Kumar

PyTorch Distributed Training Internals

The mechanism behind step 5 of the training loop: bucketed gradient all-reduce triggered from autograd hooks, what NCCL does with it, and how to diagnose the result.

August 12, 2026 · 13 min · Sandeep Kumar

PagedAttention

How PagedAttention uses virtual-memory-style KV-cache paging to reduce fragmentation and increase LLM serving throughput.

March 3, 2026 · 5 min · Sandeep Kumar