Exercises — Wafer-scale engines (Cerebras-style)
6.5.17 · D4· Hardware › Advanced & Emerging Architectures › Wafer-scale engines (Cerebras-style)
Shuru karne se pehle, ek symbol contract taaki kuch bhi unexplained na lage:
L1 — Recognition
Problem 1.1 (L1)
Silicon wafer ko normally hundreds of chhote chips mein kata jaata hai. Ek sentence mein batao ki wafer-scale engine alag kya karta hai, aur woh ek trick ka naam lo jo ise physically possible banati hai.
Recall Solution 1.1
Kya: ek WSE poore wafer ko ek single chip ke roop mein rakhta hai use dice karne ki jagah, toh saare cores fast on-silicon wires se connected rehte hain. Enabling trick: scribe lines ke across extra metal wiring add karna (dicing streets), taki normally-alag reticle fields ek connected mesh ban jaayein. Kyun important hai: scribe lines ke across wiring ke bina tumhare paas sirf ek uncut wafer par bohot saari chips hoti — ek single chip nahi. Woh ek fabrication step hi "many chips" ko "one chip" mein turn karta hai.
Problem 1.2 (L1)
Har item ko woh boundary match karo jise ek data byte ko WSE ke andar cross nahi karna padta, jabki GPU cluster mein karna padta: (a) package pins, (b) PCB traces, (c) inter-server network link, (d) ek on-core register.
Recall Solution 1.2
Ek WSE traffic ko on silicon rakhta hai, toh yeh (a) package pins, (b) PCB traces, aur (c) inter-server network link se bachta hai. Yeh (d) se nahi bachta — ek on-core register core ke andar hota hai; har architecture woh use karta hai. Kyun: parent ka poora argument yahi hai ki har boundary (core→pins→PCB→network) on-chip wire se "slower, hotter, hungrier" hoti hai. WSE outer boundaries delete karta hai, sabse inner wali nahi.
L2 — Application
Problem 2.1 (L2)
Ek process mein defect density defects/mm² hai. Poisson yield model use karke, yield compute karo (a) ek chhote die mm² ke liye aur (b) ek full wafer die mm² ke liye. Dono ko interpret karo.
Recall Solution 2.1
Yeh formula kyun: defects randomly aur independently land karte hain, isliye ek fixed area mein count Poisson hoti hai mean ke saath. Ek die sirf zero killing defects hone par kaam karti hai, aur .
(a) Small die: . Lagbhag dies kaam karti hain — ek chhoti chip ke liye routine; baaki throw away kar dete hain.
(b) Full wafer die: . Yeh effectively zero hai. Ek monolithic defect-free wafer kabhi nahi hota — isliye exactly WSEs "zero defects" abandon karke redundancy use karte hain. Yeh kaisa dikhta hai: neeche yield-vs-area curve dekho — yeh wafer scale se bahut pehle collapse ho jaata hai.

Problem 2.2 (L2)
Ek job ko working cores chahiye. Process mein expect hai ki built cores ka fraction dead rahega. Kitne cores build karne padenge?
Recall Solution 2.2
Over-provision kyun: hum perfect wafer ki demand nahi kar sakte, isliye hum spares build karte hain aur dead cores ke around reroute karte hain. Hume built mein se kam se kam survivors chahiye: Plug in: Toh ≈ 842,106 cores build karo (round up — core ka fraction build nahi ho sakta). Matlab: over-provision factor hai — lagbhag extra hardware tumhe death rate tolerate karne ki capability deta hai.
L3 — Analysis
Problem 3.1 (L3)
working cores deliver karne ke do options hain. Option A: over-provision ke saath ek wafer (2.2 se, build karne padte hain). Option B: wafer ko mm² ke chhote dies mein dice karo yield par (2.1a se), har die mein cores hain. Option B mein working cores worth yield karne ke liye kitne chhote dies build karne padenge, aur dono options mein built silicon ka kitna fraction waste hoga?
Recall Solution 3.1
Option A (wafer): built , needed . Wasted-core fraction:
Option B (diced): built die ke per working cores ? Nahi — dhyan se. Ek die ya toh poori good hoti hai ya poori throw away hoti hai (ek killing defect poori die ko kill karta hai). Toh ek good die cores deti hai; ek bad die deti hai. Dies ka good fraction . Dies jo build karni padein: Wasted-die fraction .
Analysis: Option A ~ silicon waste karta hai; Option B ~. Gap kyun: ek diced flow mein ek single defect ek saath cores discard kar deta hai. Wafer flow mein ek defect sirf ek core ko maarta hai jo uspar land karta hai, kyunki mesh uske around reroute karta hai. Fine-grained redundancy bahut zyaada silicon-efficient hai — yahi deep reason hai ki wafer-scale wasteful lagte hue bhi pay off kar sakta hai.
Problem 3.2 (L3)
GHz par ek mesh par ( hop = ns), do cores ke beech ek message ke liye average-case aur worst-case latency compare karo. Maano traffic average par nearest-neighbour hai.
Recall Solution 3.2
Hop-count = latency kyun: har core-to-core link ek clock hai, toh latency ≈ (number of hops) × (cycle time). GHz par, cycle ns.
- Neighbour (average local traffic): hop ns.
- Worst case, corner to corner: ek mesh mein tum rows phir columns ke along travel karte ho, toh hops hops ns .
Yeh kaisa dikhta hai: neeche red path corner-to-corner route hai; almost sab real traffic chhoti local hops use karta hai. Interpretation: even the worst on-wafer case (~s) best inter-server network case se match karta hai, aur typical case ( ns) usse ~1000× beat karta hai. Locality sab kuch hai.

L4 — Synthesis
Problem 4.1 (L4)
Ek WSE mein cores hain, har ek GB/s neighbours ko push karta hai. (a) Total on-wafer bandwidth compute karo. (b) Ek GPU cluster link GB/s per link tak jaata hai. WSE ke aggregate ke barabar kitne GPU links lagenge? (c) Ek sentence mein batao ki mesh par aggregate bandwidth additive kyun hoti hai?
Recall Solution 4.1
(a) Sum kyun: saare mesh links parallel mein chalte hain, isliye aggregate bandwidth add hoti hai:
(b) Equivalent GPU links: Toh ek WSE ka internal fabric ≈ ~944 top-end GPU links ki bandwidth ke barabar hai, sab ek piece of silicon par.
(c) Additive kyun: kyunki links physically alag wires hain jo simultaneously operate kar rahe hain — koi shared bottleneck channel nahi — isliye unki capacities stack hoti hain compete karne ki jagah.
Problem 4.2 (L4)
Ek model mein GB parameters hain. Har core KB SRAM hold karta hai. (a) Kya yeh fit hoga? (b) Sirf ise store karne ke liye minimum kitne cores chahiye, compute ignore karke? (c) "Model ek core mein fit hona chahiye" intuition galat kyun hai?
Recall Solution 4.2
(a)/(b) Aggregate kyun: capacity saare cores ka sum hai, per core nahi. GB store karne ke liye minimum cores: cores available hone ke saath, yeh thodi jagah bachi ke saath fit ho jaata hai — exactly isliye parent ke " GB on-chip SRAM" aur " cores" numbers design se match hote hain.
(c) Intuition galat kyun hai: model saare cores mein sharded hota hai; koi single core kabhi use hold nahi karta. Mesh partial results ko together stitch karta hai, isliye relevant capacity distributed total hai, na ki chhota per-core SRAM.
L5 — Mastery
Problem 5.1 (L5)
Design decision: tumhara model ReLU ke baad zero activations rakhta hai (sparsity ). Dense hardware par har multiply chalta hai; ek WSE par, multiply-by-zero skip hota hai. (a) Sparsity se ideal speedup kya hai? (b) Agar skipping remaining work par overhead leta hai (nonzeros indexing), toh effective speedup kya hai? (c) Batao ki yeh hardware advantage kab disappear hota hai.
Recall Solution 5.1
(a) Zeros skip kyun: se multiply karna produce karta hai aur time aur energy waste karta hai. Agar activations ka fraction zero hai, toh sirf kaam bachta hai. Dense ke against ideal speedup:
(b) Overhead ke saath: nonzero work hai , indexing cost se inflate hoke, yaani . Effective work fraction . Toh overhead ko tak trim karta hai — phir bhi ek real win.
(c) Kab disappear hota hai: agar sparsity low hai (kam zeros), aur overhead ise even slower bana sakta hai. Agar sparsity unstructured hai lekin hardware ko structured patterns chahiye the, toh skipping machinery stall ho jaati hai. WSEs unstructured sparsity par shine karte hain, jise dense GPUs exploit karna mushkil paate hain — dekho Sparsity in Neural Networks.
Problem 5.2 (L5)
Apne khilaf steel-man: ek aisa workload propose karo jahan WSE galat choice hai, aur mesh se tied bandwidth/locality argument ke saath justify karo.
Recall Solution 5.2
Ek bad-fit workload: ek tiny model with ek huge streaming dataset jo all-to-all communication karta hai (jaise kuch graph/embedding-lookup jobs jahan har core ko har step arbitrary door ka data reach karna padta hai). Mesh yahan kyun haarta hai:
- Mesh ka advantage nearest-neighbour locality hai — local hops ~1 ns hote hain. All-to-all average paths ko corner-to-corner ~s ke paas force karta hai, locality win erase karta hai (Problem 3.2).
- "No external DRAM" fatal hai agar dataset ~ GB on-wafer SRAM se zyaada ho: ab tum off-wafer stream karte ho, wahi interconnect wall hit karte hue jo WSE avoid karne ke liye bana tha. Conclusion: WSEs jab jeette hain jab model + working set on-wafer fit ho aur traffic mostly local/streaming ho. Koi bhi ek assumption todho aur off-chip DRAM plus conventional cluster use use beat kar sakta hai.
Recall Ek-line self-test
Wafer-scale over-provision factor tiny (~) kyun hai jabki same defect density par ek diced flow ~ waste karta hai? ::: Kyunki wafer flow ki redundancy ki unit ek single core hai (ek defect ek core ko maarta hai, mesh reroute karta hai), jabki diced flow ki unit ek whole die hai (ek defect ~1000 cores scrap karta hai).