merged into triton-lang/triton
- #12001Store file cache group children relative to the cache dir
I work on AI infra and inference, and love reading, writing, music and art.
I work on AI infra and inference, and love reading, writing, music and art.

I work on AI infra and inference, and love reading, writing, music and art.

opened 29 Sep, still open
opened 29 Sep, still open
Checks the handoffs inside inference systems (a request moved after a crash, KV cache from a shared pool, weights copied from an RL trainer) by redoing a sample the slow, trusted way.
on GitHub since 24 Sep
opened 16 Sep, still open
opened 3 Sep, still open
Record benchmark conditions. Check what changed before comparing numbers. On PyPI.
first released on PyPI 29 Aug
HAMi issue 1662 blamed a lock file for a minute of startup latency. By the time I got there the lock had been replaced, and the expensive part was never the lock: it was a CUDA context created so a process could learn which PID the host calls it. One process carried from Kubernetes allocation to cuInit, then 300 released at once.
A source-pinned reconstruction of PyTorch from one small training step: tensor identity, storage and views, ATen dispatch, modules, autograd, optimizers, modes, devices, transforms, compilation, export, data workers, distributed reducers, serialization, profiling, and custom operators.
opened 28 Jul, still open
A two-locality demo hangs before the hierarchy is even visible. Fixing it leads through HPX communicator servers, uneven trees, all-to-all routing, shared generation clocks, scans, flattened payloads, convergent failures, MPI shutdown, and one still-open endpoint repair.
Six integers become a 2x3 matrix. Turning it sideways without moving them produces either the right answer or a very plausible wrong one, depending on two strides.
opened 26 Jul, still open
Running CommCanary end to end on a laptop: a compression tool that doubled the size of its input, an error budget the compiler refused, a search whose own receipts outweighed what it saved, and the one number in the whole pipeline that turned out to mean what it said.
A delta-debugging reducer deleted ninety nine of a trace's one hundred events and every configuration ranking survived. Why preserving the decision is the wrong gate on its own, and how CommCanary compresses a distributed LLM communication trace while proving the compression kept the answer.
A pointer remembers the first element of a vector. One push_back later, the value survives and the pointer does not. Following the missing address through arrays, layout, lifetime, vector growth, arenas, and pools.
A delayed dequeue sees the same head address twice and succeeds with a stale compare-and-swap. Following that returned address through FIFO invariants, helping, linearizability, hazard pointers, reclamation, and the actual limits of lock-free progress.
The same open call returns a file descriptor, and then returns Operation not permitted. Following the result through the arm64 trap, XNU's file authorization path, a process policy, Linux seccomp, and executable memory.
A collective benchmark put one NCCL configuration safely in the middle. The workload put it last. Following that disagreement through trace capture, replay scheduling, CUDA streams, ranking statistics, missing evidence, queueing, and one source line that changed the explanation.
Eight ranks need the same sum. The HPX call leads into one communicator server, then into five executed all-reduce algorithms, a byte-and-message cost model, fresh MPI measurements, and a provenance-stamped cluster result that changes what the source alone seemed to imply.
A mapping succeeds with no resident pages, then one ordinary load per page enters the kernel 256 times. Following those loads through virtual addresses, arm64 translation, XNU faults, zero fill, protection, copy-on-write, file sharing, wiring, and the measurements that cannot reveal a TLB.
rand() returns the same numbers after every process start. The first value leads into state recovery, entropy, biased mappings, finite tails, forked streams, and benchmark results whose meaning changes when order and uncertainty are handled.
Distill a distributed-LLM communication trace into a small, model-free regression canary, and prove the distillation didn't change the answer.
on GitHub since 30 Jun
One line enters torch.compile. What comes back is a guarded region containing a library matrix multiply and a generated C++ loop, plus a crash that four threads can reproduce and one thread cannot.
A rank-8 patch fit the training target while the frozen model forgot unrelated text. The loss said it learned. The held-out prompts forced a more careful answer.
A thirty-line tape and PyTorch agree on one gradient. A finite difference does not. Following the discrepancy reaches the chain rule, reverse and forward accumulation, matrix backward, GPT-2, checkpointed activations, optimizer state, and the numbers fp16 cannot keep.
GPT-2 put Paris fifth. Following the exact rows behind that result reaches byte-pair tokens, matrix products, attention, residual state, a growing KV cache, batch reuse, and the difference between simulating 4-bit error and running a packed kernel.
One counter, two machines, one dropped packet, and the state that must survive retries, partitions, and a killed process before an acknowledged increment can be trusted.
What really happens when two machines talk to each other?
One program that sums every byte of a 1 GiB file, and the same arithmetic made 4000x slower and then fast again, a walk through syscalls, the user/kernel boundary, 16 KiB pages, page faults, the page cache, mmap, P and E cores, sampling profilers, and using the roofline as a bottleneck detector.
A column read that looked thirty-eight times faster led into Parquet pages, byte ranges, encodings, pruning, Arrow buffers, and the commit race hidden behind a table.
Summing ten million numbers takes 290 ms in a Python loop and 3.4 ms in numpy. Following the gap reaches PyObject boxing, pairwise reduction, native buffers, ownership, the GIL, and the point where zero-copy stops being a sufficient claim.
Two threads each add one to a counter a million times, and it comes out to 1,012,274, a different wrong number every run. Following that lost million down through the load-add-store race, atomics, the weakly-ordered memory model, false sharing, mutexes and deadlock, and up to why real systems hand you tasks and futures instead of raw threads.
A walk from a slow 512x512 C matrix multiply through cache, SIMD, FMA, tiling, roofline thinking, Metal kernels, threadgroup memory, GEMM, reductions, softmax, attention, and fusion.
A full walk through computer numerics from integer representation and IEEE-754 float bits to rounding, subnormals, cancellation, compensated summation, SIMD/FMA/BLAS, mixed precision, and quantization.
A C++ toolchain walk from preprocessing and templates to object files, ODR traps, static and dynamic linking, ABI symbols, relocations, GOT/stubs, lazy binding, dyld, and the first instruction of a process.
Five lines of Python followed all the way down: a 52 KB Mach-O launcher, tokens, AST, bytecode, _PyEval_EvalFrameDefault, PyObject, refcounts and immortals, cyclic GC, the GIL, free-threading, specialization, the experimental JIT, and the C API.
Value categories, RAII, move semantics, copy elision, smart pointers, templates, and concepts, traced from one line of libc++ source. With real benchmarks on an M4 and real HPX code throughout.
Post-training quantization of transformer weights to {-1, 0, +1}, with custom Triton kernels for the quantized matmul.
on GitHub since 31 Jan
A BERT reranker distilled into a smaller student, then ONNX and 8-bit quantization for low-latency search.
on GitHub since 1 Sep 2025
2026
2026

Checks the handoffs inside inference systems (a request moved after a crash, KV cache from a shared pool, weights copied from an RL trainer) by redoing a sample the slow, trusted way.
2026


Record benchmark conditions. Check what changed before comparing numbers. On PyPI.

2026HAMi issue 1662 blamed a lock file for a minute of startup latency. By the time I got there the lock had been replaced, and the expensive part was never the lock: it was a CUDA context created so a process could learn which PID the host calls it. One process carried from Kubernetes allocation to cuInit, then 300 released at once.
A source-pinned reconstruction of PyTorch from one small training step: tensor identity, storage and views, ATen dispatch, modules, autograd, optimizers, modes, devices, transforms, compilation, export, data workers, distributed reducers, serialization, profiling, and custom operators.
A two-locality demo hangs before the hierarchy is even visible. Fixing it leads through HPX communicator servers, uneven trees, all-to-all routing, shared generation clocks, scans, flattened payloads, convergent failures, MPI shutdown, and one still-open endpoint repair.

Six integers become a 2x3 matrix. Turning it sideways without moving them produces either the right answer or a very plausible wrong one, depending on two strides.
Running CommCanary end to end on a laptop: a compression tool that doubled the size of its input, an error budget the compiler refused, a search whose own receipts outweighed what it saved, and the one number in the whole pipeline that turned out to mean what it said.
A delta-debugging reducer deleted ninety nine of a trace's one hundred events and every configuration ranking survived. Why preserving the decision is the wrong gate on its own, and how CommCanary compresses a distributed LLM communication trace while proving the compression kept the answer.

A pointer remembers the first element of a vector. One push_back later, the value survives and the pointer does not. Following the missing address through arrays, layout, lifetime, vector growth, arenas, and pools.
A delayed dequeue sees the same head address twice and succeeds with a stale compare-and-swap. Following that returned address through FIFO invariants, helping, linearizability, hazard pointers, reclamation, and the actual limits of lock-free progress.
The same open call returns a file descriptor, and then returns Operation not permitted. Following the result through the arm64 trap, XNU's file authorization path, a process policy, Linux seccomp, and executable memory.
A collective benchmark put one NCCL configuration safely in the middle. The workload put it last. Following that disagreement through trace capture, replay scheduling, CUDA streams, ranking statistics, missing evidence, queueing, and one source line that changed the explanation.
Eight ranks need the same sum. The HPX call leads into one communicator server, then into five executed all-reduce algorithms, a byte-and-message cost model, fresh MPI measurements, and a provenance-stamped cluster result that changes what the source alone seemed to imply.
A mapping succeeds with no resident pages, then one ordinary load per page enters the kernel 256 times. Following those loads through virtual addresses, arm64 translation, XNU faults, zero fill, protection, copy-on-write, file sharing, wiring, and the measurements that cannot reveal a TLB.
rand() returns the same numbers after every process start. The first value leads into state recovery, entropy, biased mappings, finite tails, forked streams, and benchmark results whose meaning changes when order and uncertainty are handled.
2026
Distill a distributed-LLM communication trace into a small, model-free regression canary, and prove the distillation didn't change the answer.

One line enters torch.compile. What comes back is a guarded region containing a library matrix multiply and a generated C++ loop, plus a crash that four threads can reproduce and one thread cannot.
A rank-8 patch fit the training target while the frozen model forgot unrelated text. The loss said it learned. The held-out prompts forced a more careful answer.
A thirty-line tape and PyTorch agree on one gradient. A finite difference does not. Following the discrepancy reaches the chain rule, reverse and forward accumulation, matrix backward, GPT-2, checkpointed activations, optimizer state, and the numbers fp16 cannot keep.
2026GPT-2 put Paris fifth. Following the exact rows behind that result reaches byte-pair tokens, matrix products, attention, residual state, a growing KV cache, batch reuse, and the difference between simulating 4-bit error and running a packed kernel.
One counter, two machines, one dropped packet, and the state that must survive retries, partitions, and a killed process before an acknowledged increment can be trusted.
What really happens when two machines talk to each other?
2026One program that sums every byte of a 1 GiB file, and the same arithmetic made 4000x slower and then fast again, a walk through syscalls, the user/kernel boundary, 16 KiB pages, page faults, the page cache, mmap, P and E cores, sampling profilers, and using the roofline as a bottleneck detector.
A column read that looked thirty-eight times faster led into Parquet pages, byte ranges, encodings, pruning, Arrow buffers, and the commit race hidden behind a table.
Summing ten million numbers takes 290 ms in a Python loop and 3.4 ms in numpy. Following the gap reaches PyObject boxing, pairwise reduction, native buffers, ownership, the GIL, and the point where zero-copy stops being a sufficient claim.

Two threads each add one to a counter a million times, and it comes out to 1,012,274, a different wrong number every run. Following that lost million down through the load-add-store race, atomics, the weakly-ordered memory model, false sharing, mutexes and deadlock, and up to why real systems hand you tasks and futures instead of raw threads.
A walk from a slow 512x512 C matrix multiply through cache, SIMD, FMA, tiling, roofline thinking, Metal kernels, threadgroup memory, GEMM, reductions, softmax, attention, and fusion.
2026A full walk through computer numerics from integer representation and IEEE-754 float bits to rounding, subnormals, cancellation, compensated summation, SIMD/FMA/BLAS, mixed precision, and quantization.
A C++ toolchain walk from preprocessing and templates to object files, ODR traps, static and dynamic linking, ABI symbols, relocations, GOT/stubs, lazy binding, dyld, and the first instruction of a process.
Five lines of Python followed all the way down: a 52 KB Mach-O launcher, tokens, AST, bytecode, _PyEval_EvalFrameDefault, PyObject, refcounts and immortals, cyclic GC, the GIL, free-threading, specialization, the experimental JIT, and the C API.
Value categories, RAII, move semantics, copy elision, smart pointers, templates, and concepts, traced from one line of libc++ source. With real benchmarks on an M4 and real HPX code throughout.
2026
Post-training quantization of transformer weights to {-1, 0, +1}, with custom Triton kernels for the quantized matmul.
2025
A BERT reranker distilled into a smaller student, then ONNX and 8-bit quantization for low-latency search.
October 2026
September 2026
Checks the handoffs inside inference systems (a request moved after a crash, KV cache from a shared pool, weights copied from an RL trainer) by redoing a sample the slow, trusted way.






August 2026
Record benchmark conditions. Check what changed before comparing numbers. On PyPI.


July 2026




HAMi issue 1662 blamed a lock file for a minute of startup latency. By the time I got there the lock had been replaced, and the expensive part was never the lock: it was a CUDA context created so a process could learn which PID the host calls it. One process carried from Kubernetes allocation to cuInit, then 300 released at once.
HAMi issue 1662 blamed a lock file for a minute of startup latency. By the time I got there the lock had been replaced, and the expensive part was never the lock: it was a CUDA context created so a process could learn which PID the host calls it. One process carried from Kubernetes allocation to cuInit, then 300 released at once.




A source-pinned reconstruction of PyTorch from one small training step: tensor identity, storage and views, ATen dispatch, modules, autograd, optimizers, modes, devices, transforms, compilation, export, data workers, distributed reducers, serialization, profiling, and custom operators.
A source-pinned reconstruction of PyTorch from one small training step: tensor identity, storage and views, ATen dispatch, modules, autograd, optimizers, modes, devices, transforms, compilation, export, data workers, distributed reducers, serialization, profiling, and custom operators.




A two-locality demo hangs before the hierarchy is even visible. Fixing it leads through HPX communicator servers, uneven trees, all-to-all routing, shared generation clocks, scans, flattened payloads, convergent failures, MPI shutdown, and one still-open endpoint repair.
A two-locality demo hangs before the hierarchy is even visible. Fixing it leads through HPX communicator servers, uneven trees, all-to-all routing, shared generation clocks, scans, flattened payloads, convergent failures, MPI shutdown, and one still-open endpoint repair.




Six integers become a 2x3 matrix. Turning it sideways without moving them produces either the right answer or a very plausible wrong one, depending on two strides.
Six integers become a 2x3 matrix. Turning it sideways without moving them produces either the right answer or a very plausible wrong one, depending on two strides.





Running CommCanary end to end on a laptop: a compression tool that doubled the size of its input, an error budget the compiler refused, a search whose own receipts outweighed what it saved, and the one number in the whole pipeline that turned out to mean what it said.
Running CommCanary end to end on a laptop: a compression tool that doubled the size of its input, an error budget the compiler refused, a search whose own receipts outweighed what it saved, and the one number in the whole pipeline that turned out to mean what it said.




A delta-debugging reducer deleted ninety nine of a trace's one hundred events and every configuration ranking survived. Why preserving the decision is the wrong gate on its own, and how CommCanary compresses a distributed LLM communication trace while proving the compression kept the answer.
A delta-debugging reducer deleted ninety nine of a trace's one hundred events and every configuration ranking survived. Why preserving the decision is the wrong gate on its own, and how CommCanary compresses a distributed LLM communication trace while proving the compression kept the answer.




A pointer remembers the first element of a vector. One push_back later, the value survives and the pointer does not. Following the missing address through arrays, layout, lifetime, vector growth, arenas, and pools.
A pointer remembers the first element of a vector. One push_back later, the value survives and the pointer does not. Following the missing address through arrays, layout, lifetime, vector growth, arenas, and pools.





A delayed dequeue sees the same head address twice and succeeds with a stale compare-and-swap. Following that returned address through FIFO invariants, helping, linearizability, hazard pointers, reclamation, and the actual limits of lock-free progress.
A delayed dequeue sees the same head address twice and succeeds with a stale compare-and-swap. Following that returned address through FIFO invariants, helping, linearizability, hazard pointers, reclamation, and the actual limits of lock-free progress.




The same open call returns a file descriptor, and then returns Operation not permitted. Following the result through the arm64 trap, XNU's file authorization path, a process policy, Linux seccomp, and executable memory.
The same open call returns a file descriptor, and then returns Operation not permitted. Following the result through the arm64 trap, XNU's file authorization path, a process policy, Linux seccomp, and executable memory.




A collective benchmark put one NCCL configuration safely in the middle. The workload put it last. Following that disagreement through trace capture, replay scheduling, CUDA streams, ranking statistics, missing evidence, queueing, and one source line that changed the explanation.
A collective benchmark put one NCCL configuration safely in the middle. The workload put it last. Following that disagreement through trace capture, replay scheduling, CUDA streams, ranking statistics, missing evidence, queueing, and one source line that changed the explanation.





Eight ranks need the same sum. The HPX call leads into one communicator server, then into five executed all-reduce algorithms, a byte-and-message cost model, fresh MPI measurements, and a provenance-stamped cluster result that changes what the source alone seemed to imply.
Eight ranks need the same sum. The HPX call leads into one communicator server, then into five executed all-reduce algorithms, a byte-and-message cost model, fresh MPI measurements, and a provenance-stamped cluster result that changes what the source alone seemed to imply.




A mapping succeeds with no resident pages, then one ordinary load per page enters the kernel 256 times. Following those loads through virtual addresses, arm64 translation, XNU faults, zero fill, protection, copy-on-write, file sharing, wiring, and the measurements that cannot reveal a TLB.
A mapping succeeds with no resident pages, then one ordinary load per page enters the kernel 256 times. Following those loads through virtual addresses, arm64 translation, XNU faults, zero fill, protection, copy-on-write, file sharing, wiring, and the measurements that cannot reveal a TLB.




rand() returns the same numbers after every process start. The first value leads into state recovery, entropy, biased mappings, finite tails, forked streams, and benchmark results whose meaning changes when order and uncertainty are handled.
rand() returns the same numbers after every process start. The first value leads into state recovery, entropy, biased mappings, finite tails, forked streams, and benchmark results whose meaning changes when order and uncertainty are handled.

June 2026
Distill a distributed-LLM communication trace into a small, model-free regression canary, and prove the distillation didn't change the answer.





One line enters torch.compile. What comes back is a guarded region containing a library matrix multiply and a generated C++ loop, plus a crash that four threads can reproduce and one thread cannot.
One line enters torch.compile. What comes back is a guarded region containing a library matrix multiply and a generated C++ loop, plus a crash that four threads can reproduce and one thread cannot.




A rank-8 patch fit the training target while the frozen model forgot unrelated text. The loss said it learned. The held-out prompts forced a more careful answer.
A rank-8 patch fit the training target while the frozen model forgot unrelated text. The loss said it learned. The held-out prompts forced a more careful answer.




A thirty-line tape and PyTorch agree on one gradient. A finite difference does not. Following the discrepancy reaches the chain rule, reverse and forward accumulation, matrix backward, GPT-2, checkpointed activations, optimizer state, and the numbers fp16 cannot keep.
A thirty-line tape and PyTorch agree on one gradient. A finite difference does not. Following the discrepancy reaches the chain rule, reverse and forward accumulation, matrix backward, GPT-2, checkpointed activations, optimizer state, and the numbers fp16 cannot keep.
May 2026




GPT-2 put Paris fifth. Following the exact rows behind that result reaches byte-pair tokens, matrix products, attention, residual state, a growing KV cache, batch reuse, and the difference between simulating 4-bit error and running a packed kernel.
GPT-2 put Paris fifth. Following the exact rows behind that result reaches byte-pair tokens, matrix products, attention, residual state, a growing KV cache, batch reuse, and the difference between simulating 4-bit error and running a packed kernel.




One counter, two machines, one dropped packet, and the state that must survive retries, partitions, and a killed process before an acknowledged increment can be trusted.
One counter, two machines, one dropped packet, and the state that must survive retries, partitions, and a killed process before an acknowledged increment can be trusted.




What really happens when two machines talk to each other?
What really happens when two machines talk to each other?
April 2026




One program that sums every byte of a 1 GiB file, and the same arithmetic made 4000x slower and then fast again, a walk through syscalls, the user/kernel boundary, 16 KiB pages, page faults, the page cache, mmap, P and E cores, sampling profilers, and using the roofline as a bottleneck detector.
One program that sums every byte of a 1 GiB file, and the same arithmetic made 4000x slower and then fast again, a walk through syscalls, the user/kernel boundary, 16 KiB pages, page faults, the page cache, mmap, P and E cores, sampling profilers, and using the roofline as a bottleneck detector.




A column read that looked thirty-eight times faster led into Parquet pages, byte ranges, encodings, pruning, Arrow buffers, and the commit race hidden behind a table.
A column read that looked thirty-eight times faster led into Parquet pages, byte ranges, encodings, pruning, Arrow buffers, and the commit race hidden behind a table.




Summing ten million numbers takes 290 ms in a Python loop and 3.4 ms in numpy. Following the gap reaches PyObject boxing, pairwise reduction, native buffers, ownership, the GIL, and the point where zero-copy stops being a sufficient claim.
Summing ten million numbers takes 290 ms in a Python loop and 3.4 ms in numpy. Following the gap reaches PyObject boxing, pairwise reduction, native buffers, ownership, the GIL, and the point where zero-copy stops being a sufficient claim.





Two threads each add one to a counter a million times, and it comes out to 1,012,274, a different wrong number every run. Following that lost million down through the load-add-store race, atomics, the weakly-ordered memory model, false sharing, mutexes and deadlock, and up to why real systems hand you tasks and futures instead of raw threads.
Two threads each add one to a counter a million times, and it comes out to 1,012,274, a different wrong number every run. Following that lost million down through the load-add-store race, atomics, the weakly-ordered memory model, false sharing, mutexes and deadlock, and up to why real systems hand you tasks and futures instead of raw threads.




A walk from a slow 512x512 C matrix multiply through cache, SIMD, FMA, tiling, roofline thinking, Metal kernels, threadgroup memory, GEMM, reductions, softmax, attention, and fusion.
A walk from a slow 512x512 C matrix multiply through cache, SIMD, FMA, tiling, roofline thinking, Metal kernels, threadgroup memory, GEMM, reductions, softmax, attention, and fusion.
March 2026




A full walk through computer numerics from integer representation and IEEE-754 float bits to rounding, subnormals, cancellation, compensated summation, SIMD/FMA/BLAS, mixed precision, and quantization.
A full walk through computer numerics from integer representation and IEEE-754 float bits to rounding, subnormals, cancellation, compensated summation, SIMD/FMA/BLAS, mixed precision, and quantization.




A C++ toolchain walk from preprocessing and templates to object files, ODR traps, static and dynamic linking, ABI symbols, relocations, GOT/stubs, lazy binding, dyld, and the first instruction of a process.
A C++ toolchain walk from preprocessing and templates to object files, ODR traps, static and dynamic linking, ABI symbols, relocations, GOT/stubs, lazy binding, dyld, and the first instruction of a process.




Five lines of Python followed all the way down: a 52 KB Mach-O launcher, tokens, AST, bytecode, _PyEval_EvalFrameDefault, PyObject, refcounts and immortals, cyclic GC, the GIL, free-threading, specialization, the experimental JIT, and the C API.
Five lines of Python followed all the way down: a 52 KB Mach-O launcher, tokens, AST, bytecode, _PyEval_EvalFrameDefault, PyObject, refcounts and immortals, cyclic GC, the GIL, free-threading, specialization, the experimental JIT, and the C API.




Value categories, RAII, move semantics, copy elision, smart pointers, templates, and concepts, traced from one line of libc++ source. With real benchmarks on an M4 and real HPX code throughout.
Value categories, RAII, move semantics, copy elision, smart pointers, templates, and concepts, traced from one line of libc++ source. With real benchmarks on an M4 and real HPX code throughout.
January 2026
Post-training quantization of transformer weights to {-1, 0, +1}, with custom Triton kernels for the quantized matmul.
September 2025
A BERT reranker distilled into a smaller student, then ONNX and 8-bit quantization for low-latency search.


literary fiction
classics
computing
memoir
coming of age
historical fiction
science fiction
dystopian fiction
essays
philosophy
science
poetry

Every book, by genre
mostly folk, country, and ghazals.

Mostly folk, country, and ghazals.

Mostly folk, country, and ghazals.


HAMi issue 1662 blamed a lock file for a minute of startup latency. By the time I got there the lock had been replaced, and the expensive part was never the lock: it was a CUDA context created so a process could learn which PID the host calls it. One process carried from Kubernetes allocation to cuInit, then 300 released at once.
A source-pinned reconstruction of PyTorch from one small training step: tensor identity, storage and views, ATen dispatch, modules, autograd, optimizers, modes, devices, transforms, compilation, export, data workers, distributed reducers, serialization, profiling, and custom operators.
A two-locality demo hangs before the hierarchy is even visible. Fixing it leads through HPX communicator servers, uneven trees, all-to-all routing, shared generation clocks, scans, flattened payloads, convergent failures, MPI shutdown, and one still-open endpoint repair.
Six integers become a 2x3 matrix. Turning it sideways without moving them produces either the right answer or a very plausible wrong one, depending on two strides.
Running CommCanary end to end on a laptop: a compression tool that doubled the size of its input, an error budget the compiler refused, a search whose own receipts outweighed what it saved, and the one number in the whole pipeline that turned out to mean what it said.
A delta-debugging reducer deleted ninety nine of a trace's one hundred events and every configuration ranking survived. Why preserving the decision is the wrong gate on its own, and how CommCanary compresses a distributed LLM communication trace while proving the compression kept the answer.
A pointer remembers the first element of a vector. One push_back later, the value survives and the pointer does not. Following the missing address through arrays, layout, lifetime, vector growth, arenas, and pools.
A delayed dequeue sees the same head address twice and succeeds with a stale compare-and-swap. Following that returned address through FIFO invariants, helping, linearizability, hazard pointers, reclamation, and the actual limits of lock-free progress.
The same open call returns a file descriptor, and then returns Operation not permitted. Following the result through the arm64 trap, XNU's file authorization path, a process policy, Linux seccomp, and executable memory.
A collective benchmark put one NCCL configuration safely in the middle. The workload put it last. Following that disagreement through trace capture, replay scheduling, CUDA streams, ranking statistics, missing evidence, queueing, and one source line that changed the explanation.
Eight ranks need the same sum. The HPX call leads into one communicator server, then into five executed all-reduce algorithms, a byte-and-message cost model, fresh MPI measurements, and a provenance-stamped cluster result that changes what the source alone seemed to imply.
A mapping succeeds with no resident pages, then one ordinary load per page enters the kernel 256 times. Following those loads through virtual addresses, arm64 translation, XNU faults, zero fill, protection, copy-on-write, file sharing, wiring, and the measurements that cannot reveal a TLB.
rand() returns the same numbers after every process start. The first value leads into state recovery, entropy, biased mappings, finite tails, forked streams, and benchmark results whose meaning changes when order and uncertainty are handled.
One line enters torch.compile. What comes back is a guarded region containing a library matrix multiply and a generated C++ loop, plus a crash that four threads can reproduce and one thread cannot.
A rank-8 patch fit the training target while the frozen model forgot unrelated text. The loss said it learned. The held-out prompts forced a more careful answer.
A thirty-line tape and PyTorch agree on one gradient. A finite difference does not. Following the discrepancy reaches the chain rule, reverse and forward accumulation, matrix backward, GPT-2, checkpointed activations, optimizer state, and the numbers fp16 cannot keep.
GPT-2 put Paris fifth. Following the exact rows behind that result reaches byte-pair tokens, matrix products, attention, residual state, a growing KV cache, batch reuse, and the difference between simulating 4-bit error and running a packed kernel.
One counter, two machines, one dropped packet, and the state that must survive retries, partitions, and a killed process before an acknowledged increment can be trusted.
What really happens when two machines talk to each other?
One program that sums every byte of a 1 GiB file, and the same arithmetic made 4000x slower and then fast again, a walk through syscalls, the user/kernel boundary, 16 KiB pages, page faults, the page cache, mmap, P and E cores, sampling profilers, and using the roofline as a bottleneck detector.
A column read that looked thirty-eight times faster led into Parquet pages, byte ranges, encodings, pruning, Arrow buffers, and the commit race hidden behind a table.
Summing ten million numbers takes 290 ms in a Python loop and 3.4 ms in numpy. Following the gap reaches PyObject boxing, pairwise reduction, native buffers, ownership, the GIL, and the point where zero-copy stops being a sufficient claim.
Two threads each add one to a counter a million times, and it comes out to 1,012,274, a different wrong number every run. Following that lost million down through the load-add-store race, atomics, the weakly-ordered memory model, false sharing, mutexes and deadlock, and up to why real systems hand you tasks and futures instead of raw threads.
A walk from a slow 512x512 C matrix multiply through cache, SIMD, FMA, tiling, roofline thinking, Metal kernels, threadgroup memory, GEMM, reductions, softmax, attention, and fusion.
A full walk through computer numerics from integer representation and IEEE-754 float bits to rounding, subnormals, cancellation, compensated summation, SIMD/FMA/BLAS, mixed precision, and quantization.
A C++ toolchain walk from preprocessing and templates to object files, ODR traps, static and dynamic linking, ABI symbols, relocations, GOT/stubs, lazy binding, dyld, and the first instruction of a process.
Five lines of Python followed all the way down: a 52 KB Mach-O launcher, tokens, AST, bytecode, _PyEval_EvalFrameDefault, PyObject, refcounts and immortals, cyclic GC, the GIL, free-threading, specialization, the experimental JIT, and the C API.
Value categories, RAII, move semantics, copy elision, smart pointers, templates, and concepts, traced from one line of libc++ source. With real benchmarks on an M4 and real HPX code throughout.


three hundred processes waited for one pid
the tensor was only the handle
One collective call used two generations
arrays become matrices
my canary got bigger
one hundred events became one
the address where the value lived
the head pointer came back
the syscall the kernel refused
idle gaps are not compute
Rings, Trees, and Butterflies: HPX Collectives
the page that was not there
how your computer fakes randomnessI'm Anshuman Agrawal, a systems and AI infrastructure engineer. I spend my time deep in C++ parallel runtimes, CUDA, and the layers between user code and silicon.
I contribute to HPX's collective communication primitives as part of GSoC. 51 of my pull requests are merged there.
I also fix things in HAMi, which shares GPUs between pods on Kubernetes.
CommCanary GitHub, since 30 Jun 2026
Distill a distributed-LLM communication trace into a small, model-free regression canary, and prove the distillation didn't change the answer.
ceteris PyPI, first release 29 Aug 2026
Record benchmark conditions. Check what changed before comparing numbers. On PyPI.
Baton GitHub, since 24 Sep 2026
Checks the handoffs inside inference systems (a request moved after a crash, KV cache from a shared pool, weights copied from an RL trainer) by redoing a sample the slow, trusted way.
Triton 1.58 GitHub, since 31 Jan 2026
Post-training quantization of transformer weights to {-1, 0, +1}, with custom Triton kernels for the quantized matmul.
NeuroRank GitHub, since 1 Sep 2025
A BERT reranker distilled into a smaller student, then ONNX and 8-bit quantization for low-latency search.

I'm Anshuman Agrawal, a systems and AI infrastructure engineer. I spend my time deep in C++ parallel runtimes, CUDA, and the layers between user code and silicon.
I also fix things in HAMi, which shares GPUs between pods on Kubernetes.




I'm Anshuman Agrawal, a systems and AI infrastructure engineer. I spend my time deep in C++ parallel runtimes, CUDA, and the layers between user code and silicon.

Distill a distributed-LLM communication trace into a small, model-free regression canary, and prove the distillation didn't change the answer.
on GitHub since June 2026

Record benchmark conditions. Check what changed before comparing numbers. On PyPI.
on PyPI since August 2026

Checks the handoffs inside inference systems (a request moved after a crash, KV cache from a shared pool, weights copied from an RL trainer) by redoing a sample the slow, trusted way.
on GitHub since September 2026

Post-training quantization of transformer weights to {-1, 0, +1}, with custom Triton kernels for the quantized matmul.
on GitHub since January 2026

A BERT reranker distilled into a smaller student, then ONNX and 8-bit quantization for low-latency search.
on GitHub since September 2025
internet home
I work on AI infra and inference, and love reading, writing, music and art.

