ehsan totoni josep torrellas laxmikant v kale charm
play

Ehsan Totoni Josep Torrellas Laxmikant V. Kale Charm - PowerPoint PPT Presentation

Ehsan Totoni Josep Torrellas Laxmikant V. Kale Charm Workshop April 29th, 2014 Tianhe-2 ~34 PFlop/s Linpack ~18 MW power Goal:


  1. Ehsan ¡Totoni ¡ Josep ¡Torrellas ¡ Laxmikant ¡V. ¡Kale ¡ ¡ Charm ¡Workshop ¡ April ¡29th, ¡2014 ¡

  2. • Tianhe-­‑2 ¡ • ~34 ¡PFlop/s ¡Linpack ¡ • ~18 ¡MW ¡power ¡ • Goal: ¡ExaFlop/s ¡at ¡ 20MW ¡ • ~26 ¡Mmes ¡more ¡ energy ¡efficiency ¡ Top500.org ¡November ¡2013 ¡ needed ¡ 2 ¡ 2 ¡

  3. • Caches ¡consume ¡a ¡large ¡fracMon ¡of ¡ processor’s ¡power ¡ – 40% ¡in ¡POWER7, ¡a]er ¡many ¡techniques ¡ • Ge_ng ¡larger ¡every ¡day ¡ – Intel ¡Xeon ¡E7-­‑88702: ¡30MB ¡of ¡SRAM ¡L3 ¡ – IBM ¡POWER8: ¡96MB ¡of ¡eDRAM ¡L3 ¡ • Fixed ¡design, ¡but ¡applicaMons ¡are ¡different ¡ – E.g. ¡potenMally ¡no ¡locality ¡in ¡pointer ¡chasing ¡“Big ¡ Data” ¡ 3 ¡ 3 ¡

  4. • Scenario: ¡NAMD ¡on ¡Blue ¡Waters ¡ – HIV ¡simulaMons, ¡only ¡64 ¡million ¡atoms ¡ • 48 ¡bytes ¡atom ¡state ¡(posiMon ¡& ¡velocity) ¡ • Some ¡transient ¡data ¡(mulMcasts) ¡ • Assuming ¡400 ¡bytes/atom, ¡25.6 ¡GB ¡ – 4000 ¡Cray-­‑XE ¡nodes ¡ • 32 ¡MB ¡of ¡L2 ¡and ¡32 ¡MB ¡L3 ¡each ¡-­‑> ¡256 ¡GB ¡of ¡cache! ¡ • 90% ¡of ¡capacity ¡not ¡unused ¡ • (there ¡is ¡nothing ¡wrong ¡with ¡NAMD!) ¡ – 16 ¡days ¡wall ¡clock ¡Mme, ¡not ¡best ¡use ¡of ¡caches.. ¡ Huge ¡waste! ¡ 4 ¡ 4 ¡ – –

  5. • Turning ¡off ¡cache ¡ways ¡to ¡save ¡energy ¡ proposed ¡ • Two ¡main ¡issues: ¡ – PredicMng ¡the ¡applicaMons ¡future ¡ ¡ – Finding ¡the ¡best ¡cache ¡hierarchy ¡configuraMon ¡ ¡ • We ¡solve ¡both ¡on ¡HPC ¡systems ¡ 5 ¡ 5 ¡

  6. • Many ¡processors ¡are ¡commodity ¡ – Not ¡necessarily ¡designed ¡for ¡HPC ¡ • Provisioning ¡different ¡than ¡non-­‑HPC ¡ – No ¡mulM-­‑programming, ¡Mme-­‑sharing, ¡co-­‑locaMon ¡ – Large, ¡long ¡jobs ¡ – High ¡Predictability ¡ 6 ¡ 6 ¡

  7. • ProperMes ¡of ¡algorithms ¡in ¡common ¡HPC ¡apps: ¡ – ParMcle ¡interacMons ¡(MiniMD ¡and ¡CoMD) ¡ • Force ¡computaMon ¡of ¡enMMes ¡ • Small ¡domain, ¡high ¡temporal ¡locality ¡ – Stencil ¡computaMons ¡(CloverLeaf ¡and ¡MiniGhost) ¡ ¡ • Update ¡of ¡grid ¡points ¡with ¡stencils ¡ • Large ¡domain, ¡low ¡temporal ¡locality ¡ – Sparse ¡Linear ¡Algebra ¡(HPCCG, ¡MiniFE, ¡and ¡MiniXyce) ¡ ¡ • Update ¡of ¡grid ¡points ¡with ¡SpMV ¡ • O]en ¡large ¡domain, ¡low ¡temporal ¡locality ¡ 7 ¡ 7 ¡

  8. 0x03…1 0x03…2 0x03…3 0x03…4 1 6 0x05…3 0x04…4 0x05…5 0x05…6 2 3 4 8 0x07…5 0x07…6 0x07…7 0x07…8 5 7 8 ¡ 8 ¡

  9. • HPC ¡applicaMons ¡are ¡iteraMve ¡ ¡ – Persistence : ¡Same ¡paqern ¡repeats ¡ – RTS ¡can ¡monitor ¡applicaMon, ¡predict ¡future ¡ • Single ¡Program ¡MulMple ¡Data ¡(SPMD) ¡ – Different ¡processors ¡doing ¡the ¡same ¡thing ¡ – RTS ¡can ¡try ¡cache ¡configuraMons ¡exhausMvely ¡ • RTS ¡can ¡apply ¡best ¡cache ¡configuraMon ¡ – Monitor, ¡re-­‑evaluate ¡regularly ¡ 9 ¡ 9 ¡

  10. • RTS ¡tracks ¡SequenMal ¡ExecuMon ¡Blocks ¡(SEBs) ¡ – ComputaMons ¡between ¡communicaMon ¡calls ¡ • ¡IdenMfied ¡by ¡characterisMc ¡informaMon ¡ – CommunicaMon ¡calls ¡and ¡their ¡arguments ¡ – DuraMon ¡ – Key ¡performance ¡counters ¡ • Usually ¡repeated ¡in ¡every ¡iteraMon ¡ 10 ¡ 10 ¡

  11. • Hierarchical ¡iteraMon ¡structure ¡ Overall ¡iteraMon ¡ PE ¡0 ¡ PE ¡1 ¡ sub PE ¡2 ¡ iter ¡ PE ¡3 ¡ 11 ¡ 11 ¡

  12. • RTS ¡needs ¡to ¡idenMfy ¡iteraMve ¡structure ¡ – Difficult ¡in ¡most ¡general ¡sense ¡ • Using ¡Formal ¡Language ¡Theory ¡ – Define ¡each ¡SEB ¡as ¡a ¡symbol ¡of ¡an ¡alphabet ¡Σ ¡ – An ¡iteraMve ¡structure ¡is ¡a ¡ regular ¡language ¡ • Easy ¡to ¡prove ¡by ¡construcMon ¡ – Each ¡execuMon ¡is ¡a ¡ word ¡ 12 ¡ 12 ¡

  13. • In ¡profiling, ¡RTS ¡sees ¡a ¡stream ¡of ¡SEBs ¡(symbols) ¡ – Needs ¡to ¡recognize ¡the ¡paqern ¡ – Learning ¡a ¡regular ¡language ¡from ¡text ¡ – Build ¡a ¡DeterminisMc ¡Finite ¡Automaton ¡(DFA) ¡ • Prefix ¡Tree ¡Acceptor ¡(PTA) ¡ – A ¡state ¡for ¡each ¡prefix ¡ – Not ¡too ¡large ¡in ¡our ¡applicaMon ¡ a b c q λ q a q ab q abc start 13 ¡ 13 ¡

  14. • Mantevo ¡mini-­‑app ¡suite ¡ – RepresentaMve ¡inputs ¡ – Assume ¡MPI+OpenMP ¡ – IdenMfy ¡unique ¡SEBs ¡ • SESC ¡cycle-­‑accurate ¡simulator ¡ – Simulate ¡different ¡configuraMons ¡for ¡each ¡SEB ¡ • Model ¡cache ¡power/energy ¡using ¡CACTI ¡ 14 ¡ 14 ¡

  15. Format: ¡<ways ¡turned ¡on>/<total ¡number ¡of ¡ways> ¡ Mini-App L1D L1I L2 L3 CloverLeaf-cell 1/4 1/2 2/8 16/16 Best ¡configuraMon ¡ CloverLeaf-mom 1/4 1/2 2/8 16/16 depends ¡on: ¡ ¡ CoMD 1/4 1/2 2/8 8/16 NPB-FT 1/4 2/2 4/8 16/16 • ApplicaMon ¡type ¡ HPCCG 1/4 1/2 2/8 16/16 • Input ¡size ¡ miniFE-cg 1/4 1/2 2/8 16/16 miniFE-diffuse 1/4 1/2 1/8 1/16 miniGhost 1/4 1/2 2/8 16/16 miniMD 2/4 1/2 2/8 1/16 miniXyce 1/4 1/2 4/8 1/16 15 ¡ 15 ¡

  16. Time penalty Cache energy saving Di � erence from default (%) 100 80 60 40 20 0 C C C N H m m m m m l l o P P o o i i i i i M n n n n n B C v v i i i i i - C e e D F F G M X F G E E r r y T h D L L - - c o e e c d e s g a a i � t f f - - u c m s e e o l l m 5% ¡Performance ¡Penalty ¡Threshold ¡ 67% ¡cache ¡energy ¡saving ¡(28% ¡in ¡processor) ¡on ¡average ¡ 16 ¡ 16 ¡

  17. Time penalty Cache energy saving Number of Enabled Cache Ways L3 Size L2 Size L1D Size Di � erence from default (%) 100 16 80 8 60 4 40 2 20 1 0 1 2 3 5 1 0 0 0 0 0 ^ ^ ^ ^ 0 10^3 20^3 30^3 50^3 100^3 ^ 3 3 3 3 3 HPCCG Problem Size HPCCG Problem Size AdapMng ¡to ¡problem ¡size ¡is ¡crucial. ¡ 17 ¡ 17 ¡

  18. • Streaming: ¡predict ¡data ¡and ¡prefetch ¡for ¡ simple ¡memory ¡access ¡paqerns ¡ – Two ¡important ¡parameters: ¡ – Cache ¡size ¡to ¡use ¡ – Prefetch ¡depth ¡ • Can ¡waste ¡energy ¡and ¡memory ¡bandwidth ¡ – Too ¡deep/small ¡cache ¡evicts ¡useful ¡data ¡ – Prefetch ¡enough ¡data ¡to ¡hide ¡memory ¡latency ¡ 18 ¡ 18 ¡

  19. • RTS ¡can ¡tune ¡cache ¡size ¡and ¡depth ¡ – Similar ¡to ¡previous ¡discussion ¡ • Hardware ¡implementaMon: ¡ – Prefetcher ¡has ¡an ¡adder ¡to ¡generate ¡next ¡address ¡ – One ¡input ¡can ¡be ¡controlled ¡by ¡RTS ¡as ¡a ¡system ¡ register ¡ – Does ¡not ¡have ¡overheads ¡of ¡repeMMve ¡prefetch ¡ instrucMons ¡ 19 ¡ 19 ¡

  20. • Small ¡gains ¡in ¡performance ¡might ¡have ¡high ¡energy ¡cost ¡ 1 L3 way 4 L3 ways 16 L3 ways 1 L3 way 4 L3 ways 16 L3 ways 2 L3 ways 8 L3 ways 2 L3 ways 8 L3 ways 1.6 0.18 Relative Energy Consumption HPCCG Execution Time (s) 1.4 0.16 1.2 1 0.14 0.8 0.12 0.6 0.4 0.2 0.1 2 4 8 16 32 64 128 0 2 4 8 16 32 64 128 Prefetch Depth Prefetch Depth 20 ¡ 20 ¡

  21. • Wrong ¡speculaMve ¡path ¡is ¡accelerated ¡with ¡deeper ¡prefetch ¡ • Intervenes ¡with ¡useful ¡computaMon ¡ 1 L3 way 4 L3 ways 16 L3 ways 1 L3 way 4 L3 ways 16 L3 ways 2 L3 ways 8 L3 ways 2 L3 ways 8 L3 ways 1 1.04 Miss rate of L3 cache Instructions Issued 0.1 1.02 0.01 1 0.001 2 4 8 16 32 64 128 2 4 8 16 32 64 128 Prefetch Depth Prefetch Depth 21 ¡ 21 ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend