Is page ke liye assume kiya gaya hai ki aapko kuch nahi aata siwaaye basic arithmetic aur is baat ke ki ek computer chip roughly kya hoti hai. Har woh symbol jo parent note mein use hota hai, yahan ground up se build kiya gaya hai. Upar se neeche padho — har block agli block ko earn karta hai.
Ek chip silicon ka flat square hota hai. Us par billions of tiny switches hote hain jinhein transistors kehte hain. Transistors ke groups blocks banate hain — kuch arithmetic karte hain, kuch instructions fetch karte hain, kuch data store karte hain. Neeche sab kuch is baare mein hai ki kaun se blocks banane layak hain aur kyun.
Figure s01 — chip floor-plan. Chhe labelled boxes dekho: amber box woh ALU hai jahan actual math hoti hai; har white box (fetch, decode, branch prediction, reorder, cache) overhead hai — guessing aur shuffling mein spend hota kaam, computing nahi. Notice karo kitne kam boxes amber hain. Yahi imbalance hai jis ki wajah se DSAs exist karte hain: ek fixed kaam ke liye white boxes delete karo aur almost saari energy real math mein jaati hai.
Isse pehle ki hum keh sakein "DSAs jeet jaate hain", humein yeh kehna hoga ki kismein jeet. Jawab hai energy per operation, isliye humein do words ko clearly samajhna hoga jo log confuse karte hain.
Ab woh historical rule jo pehle humein bachata tha:
Figure s02 — kyun shrinking free rehna band ho gayi. Pehle cyan line follow karo: Dennard era ke dauran, generation after generation, power density flat rehti hai — free lunch. Dashed line (~2006) par amber line aage aati hai aur steeply chadhti hai: har nayi generation ab same square millimetre mein zyada heat pour karti hai. Amber arrow consequence ki taraf point karta hai — tum power-density ceiling se takraate ho aur transistors ko dark rakhna padta hai.
Ab ek DSA kis cheez se bana hota hai ka vocabulary.
Figure s03 — ek baar load karo, stream karo, reuse karo.White arrows weights ko grid mein neeche drop karte hain — har weight ek baar load hoti hai aur waheen rehti hai. Amber arrows activations ko right taraf push karte hain, ek column of cells se agle tak. Ek single weight ko ek cell mein sit karte hue follow karo: har activation jo past flow karti hai woh ek MAC trigger karti hai, toh woh ek loaded number row mein N baar reuse hoti hai. Yahi reuse — fetch kiye gaye har byte par bahut saari operations — wahi hai jo agla section arithmetic intensity kehta hai.
Parent note mein yeh sabse zyada symbol-heavy idea hai, toh hum har letter build karte hain.
Figure s04 — roofline padhna. Do ceilings "roof" banate hain: sloped amber line (slope =B, memory limit — bytes kitni tezi se pahunchte hain) aur flat white line (Ppeak, compute limit). Tumhara kernel intensity axis par ek vertical position hai. Amber dot I=50 par sloped part par land karta hai, Ppeak se kaafi neeche: tum memory-bound ho, 15 TOPS par capped. Dotted "ridge" I=300 par woh jagah hai jahan do ceilings milti hain — sirf uss ke right wale kernels compute-bound hain. Dot ko right mein move karna (zyada reuse) yahan chadne ka ek hi tarika hai.
Right side cover karo aur zor se jawab do. Agar koi bhi stumps kare, uska section upar dobara padho.
Energy aur power mein kya fark hai, aur unki units kya hain?
Energy har operation ka total work-cost hai (pJ); power energy per second hai (W=J/s).
Power density kya hai aur iska ceiling kyun hoti hai?
Power per unit area (W/mm2); zyada high hone par chip overheat ho jaati hai, isliye cap hoti hai.
Dennard scaling ne kya promise kiya tha aur kya toota?
Transistors shrink karne se power density constant rehti thi (free speed); yeh ~2006 mein khatam ho gayi toh ab zyada transistors ka matlab hai zyada heat per area.
Dark silicon kya hai?
Chip ka woh fraction jo hum switched off rakhte hain kyunki hum ek saath sare transistors power/cool nahi kar sakte.
Pollack's Rule batao aur ek reason do ki yeh kyun hold karta hai.
Single-core speed sirf area ki tarah badhti hai; area two-dimensional hai lekin extra machinery single-stream speed ko sirf one-dimensionally, diminishing returns ke saath badhati hai.
Amdahl's Law ek DSA designer ko kya batata hai?
Agar fraction f kaam accelerate nahi ho sakta, toh overall speedup kabhi 1/f beat nahi kar sakta, isliye baaki ke liye CPU bhi chahiye — hence heterogeneous systems.
MAC kya hai?
Multiply-accumulate: acc←acc+a×b, matrix multiply ki core operation.
Big-O jaise O(N2) ka matlab kya hai?
"Constants ignore karke roughly N2 ki tarah badhta hai" — N double karo aur quantity roughly four times ho jaati hai.
Ek systolic array memory traffic kyun reduce karta hai?
Data ek baar load karo aur stream karo, har value ko grid mein O(N) baar reuse karte hue.
Multiplier cost n2 kyun scale karta hai?
Ek multiplier n×n adder cells ka array hota hai (n shifted rows, har ek n bits wide), toh bit-width double karne par area quadruple ho jaata hai.
Arithmetic intensity I define karo aur uska unit batao.
I=ops/Q, move kiye gaye har byte par operations.
Roofline equation likho aur uski do ceilings naam batao.