← 💻 Coding for Infra
Advanced
Parsing Kernel Traces and Logs
The profiler exported a 40 GB trace; the fleet emitted a terabyte of logs overnight; the interviewer hands you a text file of kernel records and asks which kernels dominated, per GPU, per stream. The problem is a parser plus an aggregation, and it is a test of three habits: streaming instead of loading, choosing the key you aggregate on before you write a line, and handling malformed input as data rather than as an exception. This page works the reported trace-classification problem end to end, derives the memory bounds of each design, and shows the generator-based structure that scales from a screen-sized file to a fleet.
Unlock the full curriculum — ₹2,000 / $25every concept + every answer · 6 months · no auto-renew
RELATED CONCEPTS
PRACTICE THIS IN REAL QUESTIONS
Coding for InfraYou are handed a 40 GB kernel trace. Write the parser that turns it into per-instruction access statistics without running out of memory.→Coding for InfraTokens arrive as byte fragments and a character can span several. Write the decoder that streams text correctly.→CUDA, Triton & Kernel EngineeringGiven the addresses each thread in a warp touched, classify the access pattern: coalesced, strided or random. Write the classifier.→AI Infrastructure System DesignDesign an LLM batching system end to end: the queue, the batch, the KV cache and streaming. Give me numbers.→LLM Inference & ServingYou stream tokens to clients over HTTP. What can go wrong, and how does the server handle each case?→AI Infrastructure System DesignDesign token-level billing and metering for an LLM API: count at the engine, aggregate, reconcile, and survive the failure modes.→
