AKP Anthropic Kernel Path

0/21 read · no cycles yet

Month 2 — CSAPP finish, linear algebra, PMPP/CUDA proper, FA through the algorithm

Continues first-30-days.md (Track A, strong SWE / weak ML). Prefer that file over 05-interview/full-prep.md. Delta: full-prep's first 30 days is Karpathy micrograd → CS336; the delivered month 1 is CSAPP + take-home + metal first. Do not restart at micrograd. If you never did Karpathy lectures 1–6, park them on Sunday walks, not Deep 1.

Clock: operating-system.md (12h × 6 days). Deep 1 / Deep 2 / paper / Friday sport as below. Cite, do not re-list: 02-foundations/curriculum.md (CSAPP 7a, LA module 1, FP module 5), 03-kernels/curriculum.md Layer 0–1.

Month goals

  • Finish CSAPP Ch 4, 7–9 (and any leftover 5/8) with practice problems, not highlights. Cache + malloc labs if you have them.
  • Linear algebra you can feel: Trefethen & Bau Lectures 1–12 or Axler Ch 1–5 (pick one book; stay). SVD stated, thin SVD by hand for a 4×3.
  • PMPP 4e Ch 1–6 (or 5e equivalent) + CUDA C++ Programming Guide programming model. Tiled GEMM you profile. Triton GEMM that matches it.
  • FlashAttention (Dao 2022) through the algorithm box + §2 IO. Online softmax from memory. No FA2/FA3 yet.
  • Take-home < 3,000 cycles, tests green, written changelog.

If month 1 exit had more than two unchecked boxes, spend week 1 as a patch week. Do not "go on to MoE."


Week 5 — CSAPP backend + LA start

Goal: linking / VM / malloc taste; LA started; take-home not ignored.

DayDeep 1Deep 2Paper / bookFriday sport / Sat
MonCSAPP Ch 7 (linking). objdump your month-1 C timing program.Take-home: one new trick or a cleaner scheduler. Measure.None.
TueCSAPP Ch 8 (ECF) 90 min then Ch 9 start (VM, page tables).LA: Trefethen 1–3 or Axler Ch 1. All exercises in the sitting.None.
WedProfile / debug day: month-1 Triton GEMM or fused RMSNorm. No new papers. Make it correct and measured.CSAPP malloc chapter problems, or start malloc lab.Roofline reread (Williams 2009) against your GEMM numbers.
ThuLA continues (Trefethen 4–6 / Axler Ch 2).CUDA/PMPP Ch 1–2 if not solid from month 1; else occupancy sweep (03-kernels L1 ex. 2).FlashAttention §1 only (motivation, IO as the problem).
FriTake-home sport (5h). Target < 4,000 if you ended month 1 at ~5k; < 3,500 if you were already under 5k.——Changelog.
SatLong build: CSAPP cache lab or a from-scratch bump+free-list allocator (02-foundations L0 / module 7a).——Writeup.
SunOff-ish. Anki.

Week 5 exit: CSAPP 7–9 started, LA book chosen and used, take-home moving.


Week 6 — Linear algebra that is not a meme + FA algorithm

Goal: attention is linear algebra + a softmax. You can say SVD without irony.

DayDeep 1Deep 2Paper / bookFri / Sat
MonTrefethen 7–9 (QR, conditioning) or Axler Ch 3. Problems.Re-derive attention + online softmax, blank page (25 min camera). Then backprop-through-softmax on paper.None.
TueLA (Trefethen 10–12 / Axler inner products).Numpy: implement Householder QR or a thin SVD path; residual vs naive GS in f32 vs f64 (02-foundations module 1 ready-when).FlashAttention algorithm box. Copy it by hand. Mark what is exact vs approximate.
WedDebug day: your month-1 attention kernel vs F.scaled_dot_product_attention on more shapes.Take-home.FA §2 IO analysis. Reproduce the IO complexity on paper.
ThuPMPP Ch 3–4 (memory, tiling).Tiled GEMM: bank-conflict microbench (03-kernels L1 ex. 3).Goldberg / IEEE-754 reread if Ch 2 is rusty.
FriTake-home. Target < 3,200.
SatLong build: write notes/fa1-algorithm.md — tiling, online m/ℓ, what is stored for backward. No CUDA FA yet.
SunOff-ish.

Week 6 exit: FA algorithm from memory, LA through conditioning or inner products, GEMM still getting faster.


Week 7 — PMPP / CUDA proper (not SAXPY tourism)

Goal: Layer 1 start in 03-kernels/curriculum.md. Occupancy, coalescing, SMEM, a profiled tiled GEMM.

DayDeep 1Deep 2Paper / bookFri / Sat
MonPMPP Ch 5–6 + CUDA programming model (current guide).Rewrite tiled GEMM from a blank file. Time it. % of peak.None.
TueShared-memory swizzle / padding. Measure bank conflicts.Triton GEMM tutorial (03-kernels L2 resource 6) — type it, do not paste.Tillet et al. 2019 Triton paper as BG; current docs are the language.
Wedncu or torch.profiler on naive vs tiled vs Triton. Write the limiter in one sentence.CSAPP leftover chapter you skipped.None.
ThuLA catch-up (eigen / SVD intro).Take-home.Kaplan 2020 or Chinchilla — the figure and the claim, 90 min.
FriTake-home. Hold < 3,000 or write the next 1.3× on paper if you miss.
SatLong build: occupancy vs performance sweep (03-kernels L1 ex. 2). Plot.
SunOff-ish.

Week 7 exit: one GEMM you can defend with counters; Triton sibling; PMPP 1–6 actually worked.


Week 8 — Close month 2

Goal: ship. CSAPP problems exist. FA algorithm exists. Take-home < 3k.

DayDeep 1Deep 2Paper / bookFri / Sat
MonCSAPP leftover problems (Ch 5 optimizing performance if thin).Fuse RMSNorm+residual if month 1's is ugly; else start a correct standard attention in Triton (not Flash).None.
TueBlank-page FA algorithm + IO.Tiny GPT train continues (from-scratch/gpt.py). Loss must still go down.Vaswani §3 reread if shapes slipped.
WedDebug / measure day.Take-home polish.None.
ThuLA problem set you owe.Interview drill (05-interview/drills.md): 60 min incremental system.CAI paper: flowchart from memory (preview of month 3).
FriTake-home sport. Official month target < 3,000.
SatMonth 2 artifact (below).
SunOff.

Month 2 exit criteria

Artifact

Public commit: GEMM worklog (TFLOPS table vs a library baseline on your GPU), notes/fa1-algorithm.md, take-home cycle number, 800–1500 word writeup titled as the Greenhouse paragraph so far.

Do not start FA1-in-Triton until the algorithm page is something you can rewrite from a blank sheet. That is month 3.