I build high-performance backend and ML infrastructure, and I validate it against references instead of trusting it.
At Reliance Jio, I work on production 4G/5G analytics, deterministic query compilation and GPU-backed inference on Kubernetes/OpenShift, including a 13-node, air-gapped, IPv6-only deployment. Outside work, I contribute to vLLM, PyTorch, DuckDB, bpfilter and other C++ and ML projects, and build tools for GPU performance and distributed coordination.
Twenty-three merged changes across twelve upstream projects (vLLM, PyTorch, DuckDB, bpfilter, bpftrace, Wasmtime, LLVM, Apache Arrow nanoarrow, Apache Arrow Rust, OpenTelemetry C++, simdutf, unordered_dense); the twelve 2026 bug fixes each carry a regression test that fails without the fix, and every GPU claim below was measured on rented hardware and published.
vLLM — two merged pull requests
With the ARC eviction policy, the CPU KV-cache offload tier evicted a running request's first chunks before its last ones, so the chunks it kept could never be hit, since lookup needs a contiguous prefix from chunk 0. ARC now evicts a running request's chunks tail first, as LRU does. After 16 concurrent 2,048-token prompts on an RTX 4090, resident but unreachable chunks fell from 252 to 0, and replaying the prompts hit 8,016 cached tokens instead of 4,096, the same as LRU (#67098). With draft-model speculative decoding, the engine's startup dummy run took each request's draft slots out of the token budget but kept the request count, so the engine failed to start with an assertion error when the budget was small, for example Qwen3-1.7B with a Qwen3-0.6B draft at --max-num-batched-tokens 256; the dummy run now caps its requests so each keeps its query tokens plus its draft slots (#67571).
PyTorch core — five accepted changes
Enabled existing dynamic-shape support for foreach operations by default under torch.compile, with a test update (#158985). Exposed rearrange through the torch.func public API, with tests and documentation (#173183). Fixed the cuDNN CTC loss for strided log_probs and zero-initialized its gradient buffer, which cuDNN leaves unwritten past each sequence's length, with tests that compare loss and gradient against the native kernel (#203097). Fixed sparse CSR add, addmm, mm and sampled_addmm with out=, which wrote into the wrong elements of a strided out.values() view, by applying the fix the sparse maintainer posted on the issue, with two corrections and regression tests (#203228). Fixed a CUDA graph memory-pool leak: each conditional node took a pool reference it never released, so the pool could never be freed; tests check the pool's use count and fail without the fix (#201639).
DuckDB — three merged pull requests
A CASE or IF that passed a hash join's dictionary column through for some chunks only made the operator cache throw an INTERNAL error that invalidated the database; the cache now demotes such a column to flat (#27979). SELECT DISTINCT over an unnested struct covered only the columns as written, not the expanded fields, so rows collapsed wrongly; the binder now regenerates the targets after binding (#27973). The deprecated materialized C API left a result half-initialized when it met an untyped SQLNULL column, so later accessors read a missing null mask and segfaulted on SELECT NULL, 42; translation now handles SQLNULL (#27707).
Meta’s bpfilter — three merged pull requests
Added IPv4 Type of Service and IPv6 Traffic Class matchers, including command-line parsing, BPF code generation and unit tests (#364, #369); the IPv6 implementation uses endianness-safe byte loads. Fixed meta.probability above 50 %, where a sign-extended 32-bit immediate in a 64-bit BPF compare made every such rule match 100 % of packets (#597).
bpftrace — one merged pull request
print() and clear() walked a map one key at a time, 2N+1 syscalls for a map with N elements. They now read maps with BPF_MAP_LOOKUP_BATCH and clear them with BPF_MAP_LOOKUP_AND_DELETE_BATCH, up to 1,024 elements per call; on a 1M-element hash map, reading the map and clearing it are both more than 4.5× faster (kernel 6.8) (#5444).
Wasmtime (Cranelift) — one merged pull request
On x64, a brif, select, trapz/trapnz or icmp eq/ne against zero on the result of a 32- or 64-bit iadd, isub, bor or bxor emitted a separate test; it now uses the flags the operation already sets. Only zero/nonzero conditions are folded, since OF and CF differ from those of a test. Across 25 Sightglass modules, code size went down 0.12 % and the execution-time geomean was unchanged (#15220).
LLVM — one merged pull request
Tests only (NFC), no codegen change: added coverage for i16 × i16 → i32 partial reductions on x86 targets without VNNI, ahead of lowering them to PMADDWD, including CodeGen tests and loop-vectorizer cost-model tests for SSE2, AVX1, AVX2 and AVX512BW (#240903).
Apache Arrow Rust — three merged pull requests
The Parquet Arrow writer counted every row, nulls included, when deciding whether to build a dictionary cache, so mostly-null or all-null dictionary columns allocated a cache they never used; it now counts the selected non-null values across the whole write, and an all-null 131,072-row column retains 168 bytes instead of 524,456 (#12122). Added benchmarks for Parquet level encoding and nested writer cases, the baseline for encoding levels a group at a time (#12213). Sped up sparse-dictionary row encoding in arrow-row by gathering Utf8, LargeUtf8, Binary and LargeBinary dictionary values with typed kernels instead of a per-row dynamic extend: about 21–24 % lower mean time on the prepared 8,192-row string-dictionary benchmark for dictionaries of 32K–4M values (#12113).
Apache Arrow nanoarrow and OpenTelemetry C++ — one merged pull request each
Made nanoarrow's testing JSON comparison recurse into nested and dictionary child fields' metadata (#993). Removed a misaligned sockaddr_in access in OpenTelemetry C++'s SocketAddr, with a regression test that fails on the original header even without sanitizers (#4725).
simdutf — one merged pull request
On ARM64, detect_encodings checked UTF-8, UTF-16LE and UTF-32LE in three separate passes; it now checks them in one pass, as the x86 kernels do. Encodings the length rules out are skipped, failed ones are dropped every 1,024 bytes, and the scan stops once none is left. Against master on an Apple M2 Pro and a Cortex-X925 (46 inputs), 40 got faster (up to 7.6×), 5 tied and one 99-byte input ran at 0.94–0.95×; invalid inputs exit about 100–500× sooner (#1086).
unordered_dense — one merged pull request
clear() writes the whole index, so it costs as much as the largest size the table ever had. Added an opt-in clear(clear_mode::sparse) that, below one entry per 16 groups, empties each entry by its own probe walk: 16 entries left after a 4M-entry peak clear in about 95 ns instead of about 820 µs (Ryzen 9 7950X). Plain clear() is unchanged, since it must still work after keys were moved out (#387).
Landing commits: vLLM ARC eviction · draft-slot dummy run · PyTorch foreach · rearrange · CTC loss · sparse CSR out= · CUDA graph pool · DuckDB dictionary cache · DISTINCT · SQLNULL · bpfilter probability · bpftrace batch map syscalls · Wasmtime branch on op flags · LLVM i16 partial-reduction tests · arrow-rs dictionary cache · level benchmarks · dictionary gather · nanoarrow metadata · OpenTelemetry sockaddr · simdutf detect_encodings · unordered_dense sparse clear.
Inside Mustard · Clock synchronization, protocol correctness and runtime trade-offs
Mustard is a multi-instance watch-party platform: clients connect over WebSockets and use NTP-style clock estimation with predictive drift correction, and updates go through atomic Redis Lua scripts. The 48 ms P95 is a specific claim: steady-state player-reported drift, measured across three Chrome clients at approximately 300 ms RTT during a 240-second test. It is not a physical audio-output measurement.
Protocol correctness was a separate question. TLA+/TLC model checking exposed a stale-epoch bug after store resets, leading to an ordered-epoch fix, and idempotency keys plus atomic updates keep control commands from being applied twice within the deduplication window.
I also built Go and Rust relays to test protocol conformance and runtime costs. They are study implementations, not the production backend. In a local 10,000-connection test, the Rust relay used 14.5 KB of memory per connection versus 40 KB for Go; the extreme-tail latency comparison was inconclusive.
Live site · Source · Sync design · TLA+ findings · Go/Rust study
Inside Fused CUDA operators · Custom ops, deterministic gradients and FP8
These LayerNorm/RMSNorm kernels combine fused residual-add, FP8 outputs and deterministic backward reductions, and come as drop-in PyTorch modules that work under torch.compile without graph breaks. Parameter gradients use fixed-order reductions rather than atomic accumulation, which is where the determinism comes from.
For dynamic RMSNorm-to-FP8, I measured 4.9–7.2× over the eager PyTorch composite and 1.04–1.76× over the compiled composite, across tested FP16 shapes on an NVIDIA A100. Those are kernel-time comparisons, not end-to-end model speedups. For a fuller picture, the repository also documents H100 results and configurations where PyTorch wins. v0.6.0 (October 2026) adds a register-resident few-row RMSNorm kernel and a warp-per-row dynamic-FP8 path for Hopper; in an A/B against v0.5.0 on an H100 NVL, the few-row kernel is faster at every measured shape of width ≥ 4096 in all three dtypes, with per-op medians of 0.62–0.85× the v0.5.0 kernel time (results).
Inside PyTorch AutoTune · Measure the configuration instead of guessing it
Rather than guess at a training configuration, the tuner benchmarks precision, compile mode, memory format and fused-optimizer configurations on the target model and batch. Search runs under a budget, configurations are cached for reuse, and reports show trial results, compilation cost and estimated break-even time.
I measured 2.7–6.7× training-step speedups after tuning versus the PyTorch-default FP32 eager baseline across ResNet-50, ResNet-18 and a six-layer Transformer on an NVIDIA A100, with the tuner using torch.compile alongside the other optimizations. The baseline matters, though: on the Transformer, the gain is 2.55× against an eager baseline with TF32 matmuls enabled, rather than 6.65× against the defaults. Search costs and numerical trade-offs are documented as well.
Inside ChatGPT Spark · A shipped extension and its retrieval backend
Spark is a Chrome extension I built and published for capturing and searching conversation history. A React/TypeScript dashboard lets you browse saved conversations, FastAPI handles backend requests, and ChromaDB stores the embeddings behind semantic search.
infer-determinism — finds where LLM-inference GPU kernels stop being deterministic or batch-invariant, by comparing raw output bits for a fixed probe request under batch-size, position, padding, split-KV and CUDA-graph perturbations. The first run on an H100 NVL covered seven targets (PyTorch, vLLM, FlashInfer, vLLM FlashAttention, fused MoE). No divergence was recorded for the runnable torch_sdpa backends, vLLM's direct batch-invariant kernels, fused MoE, or FA2/FA3 with num_splits=1; it recorded two candidates: float32 torch.mm after vLLM's init_batch_invariance() (low severity, since model Linear layers use the Triton path), and FlashInfer CUDA-core decode with disable_split_kv=True, already reported upstream as flashinfer#7981. That run's attention probes used head dimension 64. A second H100 run added GQA, head dimensions 128 and 256, sliding windows and FP8 KV cache: vLLM FlashAttention with num_splits=1 and FlashInfer tensor-core decode with disable_split_kv=True showed no divergence, and one low-severity candidate turned up, FlashInfer prefill at head dimension 128 giving different bits under CUDA-graph replay than in eager mode. Both runs used one GPU. Source · Run 1 results · Run 2 results
spsc-latency — four bounded single-producer/single-consumer ring buffers in C++20, written from scratch (sequentially consistent indices on one cache line, acquire/release on one line, separate lines, and separate lines with a cached peer index), with a throughput and round-trip-latency harness and stress and ThreadSanitizer tests of 100 million transfers per design. On a pinned Threadripper PRO 3995WX (shared rented host), the cached design moved 133.8 M items/s with a one-way p99.9 of 140.5 ns for 8-byte messages at capacity 1024, median of 3 trials, clock overhead not subtracted. An unpinned Apple M2 Pro run is also committed. Source · x86 results · M2 results
orderbook-latency — a single-instrument limit order book in C++20 with a std::map baseline and a preallocated engine that does not allocate on the hot path; a differential test replays 500,000 messages through both and checks they agree, under normal and ASan/UBSan builds. On a pinned Threadripper PRO 3995WX (shared rented host), the fast engine's p99.9 was 281 ns against 471 ns, and its batched throughput 20.8 against 10.7 M messages/s, median of 3 repeats on the default synthetic stream, timer overhead not subtracted. Single-threaded, not an exchange gateway. Source · x86 results · M2 results
Also built: 3D Point Cloud Viewer — C++/OpenGL, octree-based culling and level-of-detail rendering.
| Area | Tools I use |
|---|---|
| Languages | C++, C, Python, Rust, Go, CUDA, TypeScript, SQL |
| Backend & data | FastAPI, NestJS, WebSockets, SSE, ClickHouse, PostgreSQL/PostGIS, Redis, ChromaDB |
| Infrastructure | Linux, Docker, Kubernetes/OpenShift, AWS, CI/CD |
| ML & performance | PyTorch internals, torch.compile, vLLM, cuSPARSE/cuDNN, GPU profiling, kernel fusion, benchmark design |
| Correctness | TLA+/TLC, reference-based tests, failing-first regression tests, deterministic-mode checks, protocol-conformance checks |
Have a systems problem worth digging into?
I’m interested in backend, distributed-systems, ML-infrastructure and performance-engineering work.
Frisco, Texas · Open to relocation
Email · LinkedIn · Hugging Face · Resume


