39
OSCAR Automatic Parallelizing and Power Reducing Multicore Compiler for Realtime Embedded to High Performance Computing Hironori Kasahara, Ph.D., IEEE Fellow, IPSJ Fellow IEEE Computer Society President 2018 Professor, Dept. of Computer Science & Engineering Director, Advanced Multicore Processor Research Institute Waseda University, Tokyo, Japan URL: http://www.kasahara.cs.waseda.ac.jp/ 2005 STARC Academia-Industry Research Award 2008 LSI of the Year Second Prize 2008 Intel AsiaAcademic Forum Best Research Award 2010 IEEE CS Golden Core Member Award 2014 Minister of Edu., Sci. & Tech. Research Prize 2015 IPSJ Fellow 2017 IEEE Fellow, IEEE Eta Kappa Nu Reviewed Papers: 216, Invited Talks: 155, Published Unexamined Patent Application:59 (Japan, US, GB, China Granted Patents: 30), Articles in News Papers, Web News, Medias incl. TV etc.: 578 1980 BS, 82 MS, 85 Ph.D. , Dept. EE, Waseda Univ. 1985 Visiting Scholar: U. of California, Berkeley 1986 Assistant Prof., 1988 Associate Prof., 1997, Waseda Univ ., Now Dept. of Computer Sci. & Eng. 1989-90 Research Scholar: U. of Illinois, Urbana- Champaign, Center for Supercomputing R&D 2004 Director, Advanced Multicore Research Institute, 2017 member: the Engineering Academy of Japan and the Science Council of Japan Committees in Societies and Government 255 IEEE Computer Society President 2018, BoG(2009- 14), Multicore STC Chair (2012-), Japan Chair (2005- 07), IPSJ Chair: HG for Mag. & J. Edit, Sig. on ARC. METI/NEDOProject Leaders: Multicore for Consumer Electronics, Advanced Parallelizing Compiler , Chair: Computer Strategy Committee Cabinet OfficeCSTP Supercomputer Strategic ICT PT, Japan Prize Selection Committees, etc. MEXTInfo. Sci. & Tech. Committee, Supercomputers (Earth Simulator, HPCI Promo., Next Gen. Supercomputer K) Committees, etc. 1

OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

14-Mar-18

OSCAR Automatic Parallelizing and Power Reducing Multicore Compiler for Realtime Embedded to High Performance Computing

Hironori Kasahara, Ph.D., IEEE Fellow, IPSJ FellowIEEE Computer Society President 2018 Professor, Dept. of Computer Science & EngineeringDirector, Advanced Multicore Processor Research InstituteWaseda University, Tokyo, JapanURL: http://www.kasahara.cs.waseda.ac.jp/

1987 IFAC World Congress Young Author Prize1997 IPSJ Sakai Special Research Award2005 STARC Academia-Industry Research Award2008 LSI of the Year Second Prize2008 Intel AsiaAcademic Forum Best Research Award2010 IEEE CS Golden Core Member Award2014 Minister of Edu., Sci. & Tech. Research Prize2015 IPSJ Fellow2017 IEEE Fellow, IEEE Eta Kappa Nu

Reviewed Papers: 216, Invited Talks: 155, Published Unexamined Patent Application:59 (Japan, US, GB, China Granted Patents: 30), Articles in News Papers, Web News, Medias incl. TV etc.: 578

1980 BS, 82 MS, 85 Ph.D. , Dept. EE, Waseda Univ. 1985 Visiting Scholar: U. of California, Berkeley1986 Assistant Prof., 1988 Associate Prof., 1997, Waseda Univ., Now Dept. of Computer Sci. & Eng. 1989-90 Research Scholar: U. of Illinois, Urbana-Champaign, Center for Supercomputing R&D2004 Director, Advanced Multicore Research Institute, 2017 member: the Engineering Academy of Japan and the Science Council of Japan

Committees in Societies and Government 255IEEE Computer Society President 2018, BoG(2009-14), Multicore STC Chair (2012-), Japan Chair (2005-07), IPSJ Chair: HG for Mag. & J. Edit, Sig. on ARC.【METI/NEDO】 Project Leaders: Multicore for Consumer Electronics, Advanced Parallelizing Compiler, Chair: Computer Strategy Committee 【Cabinet Office】 CSTP Supercomputer Strategic ICT PT, Japan Prize Selection Committees, etc.【MEXT】 Info. Sci. & Tech. Committee, Supercomputers (Earth Simulator, HPCI Promo., Next Gen. Supercomputer K) Committees, etc.

1

Page 2: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

2

IEEE Computer Society60,000+ members, volunteer-led organization, 200 technical conferences, 17 scholarly journalsand 13 magazines, awards program,Digital Library with more than 550,000 articles and papers , 400 local and regional chapters, 40 technical committees,

Page 3: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

IEEE Computer Society Members

3

Page 4: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

IEEE Computer Society BoG(Board of Governors) Feb.1, 2018

https://www.computer.org/web/cshistory/officers-201814-Mar-18 4

Page 5: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Past IEEE Computer Society PresidentsChairs of the IRE Professional Groupon Electronic Computers1951-53 Morton M. Astrahan1953-54 John H. Howard1954-55 Harry Larson1955-56 Jean H. Felker1956-57 Jerre D. Noe1957-58 Werner Buchholz1958-59 Willis H. Ware1959-60 Richard O. Endres1960-62 Arnold A. Cohen1962-64 Walter L. Anderson

Chairs of the AIEE Committeeon Large-Scale Computing Devices1946-49 Charles Concordia1949-51 John Grist Brainerd1951-53 Walter H. MacWilliams1953-55 Frank J. Maginniss1955-57 Edwin L. Harder1957-59 Morris Rubinoff1959-61 Ruben A. Imm1961-63 Claude A. Kagan1963-64 Gerhard L. Hollander

1996 Mario R. Barbacci1997 Barry W. Johnson1998 Doris L. Carver1999 Leonard L. Tripp2000 Guylaine M. Pollock2001 Benjamin W. Wah2002 Willis K. King2003 Stephen Diamond2004 Carl K. Chang2005 Gerald L. Engel2006 Deborah M. Cooper2007 Michael R. Williams2008 Rangachar Kasturi2009 Susan K. (Kathy) Land, 2010 James D. Isaak2011 Sorel Reisman2012 John W. Walz2013 David Alan Grier2014 Dejan S. Milojicic2015 Thomas M. Conte2016 Roger U. Fujii2017 Jean-Luc Gaudiot2018 Hironori Kasahara

Chairs & Presidents of the IEEE Computer Society1964-65 Keith Uncapher1965-66 Richard I. Tanaka1966-67 Samuel Levine1968-69 Charles L. Hobbs1970-71 Edward J. McCluskey1972-73 Albert S. Hoagland1974-75 Stephen S. Yau1976 Dick B. Simmons1977-78 Merlin G. Smith1979-80 Tse-Yun Feng1981 Richard E. Merwin1982-83 Oscar N. Garcia1984-85 Martha Sloan1986-87 Roy L. Russo1988 Edward A. Parrish1989 Kenneth A. Anderson1990 Helen M. Wood1991 Duncan H. Lawrie1992 Bruce D. Shriver1993 James H. Aylor1994 Laurel V. Kaleda1995 Ronald G. Hoelzeman

Page 6: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

14-Mar-186

IPSJ/IEEE-CS Young Computer Researcher AwardFor members of the IPSJ and the IEEE-CS

The First Award Ceremony: COMPSAC2018, July 23-27, NII, Tokyohttps://ieeecompsac.computer.org/2018/

Bjarne Stroustrup2018 Computer Society ComputerPioneer AwardColumbia University

Masaru KitsuregawaDirector General of NII, Past President ofIPSJ

Margaret Martonosi2018 Computer Society Technical Achievement Princeton University

Dejan MilojicicCS President 2014HP LabsCS 2022 Report

Page 7: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Join Your PeersTo share knowledge, solve problems and network

Be A LeaderParticipate on a national community, committee, or special interest groups

Access Trusted, Reliable InformationComputer Magazine & ComputingEdge Magazine Included. Member only access to Computer Society Digital Library.

Save MoneyMember receive discounted pricing on IEEE Computer Society Conferences and Events and additional member subscriptions.

Develop SkillsOnline education, certification preparation, webinars, face to face meetings

14-Mar-18 7

IEEE Computer Society Membership

Page 8: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

14-Mar-188

Page 9: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

14-Mar-189

Automatic Parallelization: David Padua Autoparallelization for GPUs: Wen-mei Hwu Dependences and Dependence Analysis: Utpal Banerjee Dynamic Parallelization: Rudolf Eigenmann Instruction Level Parallelization: Alexandru Nicolau Multigrain Parallelization and Power Reduction:

Hironori Kasahara The Polyhedral Model: Paul Feautrier Vector Computation: David Kuck (Computer Pioneer) Vectorization: P. Sadayappan Vectorization/Parallelization in the IBM Compiler:

Yaoqing Gao Vectorization/Parallelization in the Intel Compiler:

Peng Tu Roundtable Discussion by all presenters

Page 10: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Toward 20181. Refining content and services to further improve the satisfaction of CS

members; 2. Considering an incentive for volunteers to further accelerate CS activities

and promptly provide technical benefits for people around the globe; To express appreciation to volunteers: CS Point (Mileage) System: Annual & Life Time Honor, Premier Seating, Premier Registration, Distinguished Reviewer, etc

3. Offering more attractive services for practitioners in industry; 4. Providing the world’s best educational content and historical treasures for

future generations, which only the CS can create with our pioneering researchers (for example, the Multicore Compiler Video Series found at www.computer.org/web/education/multicore-video-series);

5. Thinking about sustainable membership fees while considering the diversity of economic situations within the 10 regions;

6. Cooperating with other IEEE societies and sister societies in a timely and efficient manner;

7. Intelligibly introducing the latest computer-related technologies to younger generations, including children, so that they can realize their technological dreams.

10

Page 11: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Core#2 Core#3

Core#1

Core#4 Core#5

Core#6 Core#7

SNC

0SN

C1

DBSC

DDRPADGCPGC

SM

LB

SC

SHWY

URAMDLRAM

Core#0ILRAM

D$

I$

VSWC

Multicores for Performance and Low Power

Power ∝ Frequency * Voltage2

(Voltage ∝ Frequency)Power ∝ Frequency3

If Frequency is reduced to 1/4(Ex. 4GHz1GHz),

Power is reduced to 1/64 and Performance falls down to 1/4 .<Multicores>If 8cores are integrated on a chip,Power is still 1/8 and Performance becomes 2 times.

11

Power consumption is one of the biggest problems for performance scaling from smartphones to cloud servers and supercomputers (“K” more than 10MW) .

14-Mar-18

IEEE ISSCC08: Paper No. 4.5, M.ITO, … and H. Kasahara,

“An 8640 MIPS SoC with Independent Power-off Control of 8 CPUs and 8 RAMs by an Automatic

Parallelizing Compiler”

Page 12: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Earthquake wave propagation simulation GMS developed by National Research Institute for Earth Science and Disaster Resilience (NIED)

12

Parallel Soft is important for scalable performance of multicore (LCPC2015) Just more cores don’t give us speedup Development cost and period of parallel software

are getting a bottleneck of development of embedded systems, eg. IoT, Automobile

Fjitsu M9000 SPARCMulticore Server

OSCAR Compiler gives us 211 times speedup with 128 cores

Commercial compiler gives us 0.9 times speedup with 128 cores (slow-downed against 1 core)

14-Mar-18

Automatic parallelizing compiler available on the market gave us no speedup against execution time on 1 core on 64 cores Execution time with 128 cores was slower than 1 core (0.9 times speedup)

Advanced OSCAR parallelizing compiler gave us 211 times speedup with 128cores against execution time with 1 core using commercial compiler OSCAR compiler gave us 2.1 times speedup on 1 core against commercial compiler by global cache optimization

Page 13: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Power Reduction of MPEG2 Decoding to 1/4 on 8 Core Homogeneous Multicore RP-2

by OSCAR Parallelizing Compiler

73.5% Power Reduction13

MPEG2 Decoding with 8 CPU cores

0

1

2

3

4

5

6

7

0

1

2

3

4

5

6

7

Without Power Control(Voltage:1.4V)

With Power Control (Frequency, Resume Standby: Power shutdown & Voltage lowering 1.4V-1.0V)

14-Mar-18 13

Avg. Power5.73 [W]

Avg. Power1.52 [W]

Page 14: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

14

To improve effective performance, cost-performance and software productivity and reduce power

OSCAR Parallelizing Compiler

CPU0

CORE DTU

CPU1

CORE DTU

CPU2

CORE DTU

CPU3

CORE DTU

DRP0

CORE DTU

MT1-1 MT1-2

LOAD LOADLOAD LOAD

MT1-3 MT1-4

SEND SEND

MT2-1

SEND

LOAD

SEND

MT2-2

LOAD

MT2-3

SEND

OFFOFF

OFF

MT3-1

LOAD

MT2-4MT3-2MT3-3

SEND

LOAD

LOAD

LOADLOAD

MT2-5

LOAD

MT2-6

SEND

LOAD

MT2-7

SEND

SENDLOAD

OFF

SEND

MT3-5

LOADSEND

LOADLOAD

LOAD

MT3-8

SEND

OFFMT3-7

LOAD

MT2-8

SENDSEND

LOAD

OFFSTORE

STORESTORE

STORE

TIM

E

MTG1

MTG2 MTG3

MT3-4 MT3-6

14-Mar-18

Multigrain Parallelization(LCPC1991,2001,04)

coarse-grain parallelism among loops and subroutines (2000 on SMP), near fine grain parallelism among statements (1992) in addition to loop parallelism

Data Localization Automatic data management for distributed shared memory, cache and local memory(Local Memory 1995, 2016 on RP2,Cache2001,03)Software Coherent Control (2017)

Data Transfer Overlapping(2016 partially)

Data transfer overlapping using DataTransfer Controllers (DMAs)

Power Reduction(2005 for Multicore, 2011 Multi-processes, 2013 on ARM)

Reduction of consumed power bycompiler control DVFS and Powergating with hardware supports.

Page 15: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Low Power Heterogeneous Multicore Code

GenerationAPI

Analyzer(Available

from Waseda)

Existing sequential compiler

Multicore Program Development Using OSCAR API V2.0Sequential Application

Program in Fortran or C(Consumer Electronics, Automobiles, Medical, Scientific computation, etc.)

Low Power Homogeneous Multicore Code

GenerationAPI

AnalyzerExisting

sequential compiler

Proc0

Thread 0

Code with directives

Waseda OSCARParallelizing Compiler

Coarse grain task parallelization

Data Localization DMAC data transfer Power reduction using

DVFS, Clock/ Power gating

Proc1

Thread 1

Code with directives

Parallelized API F or C program

OSCAR API for Homogeneous and/or Heterogeneous Multicores and manycoresDirectives for thread generation, memory,

data transfer using DMA, power managements

Generation of parallel machine

codes using sequential compilers

Exe

cuta

ble

on v

ario

us m

ultic

ores

OSCAR: Optimally Scheduled Advanced MultiprocessorAPI: Application Program Interface

HomegeneousMulticore s

from Vendor A(SMP servers)

Server Code GenerationOpenMP Compiler

Shred memory servers

HeterogeneousMulticores

from Vendor B Accelerator 1

Code Accelerator 2

Code

Hom

ogen

eous

Accelerator Compiler/ User Add “hint” directives

before a loop or a function to specify it is executable by

the accelerator with how many clocks

Het

ero

Manual parallelization / power reduction

14-Mar-1815

Hitachi, Renesas, NEC, Fujitsu, Toshiba, Denso, Olympus, Mitsubishi, Esol, Cats, Gaio, 3 univ.

Page 16: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Engine Control by multicore with Denso

16

Though so far parallel processing of the engine control on multicore has been very difficult, Denso and Waseda succeeded 1.95 times speedup on 2core V850 multicore processor.

1 core 2 cores

Hard real-time automobile engine control by multicore using local memories

Millions of lines C codes consisting conditional branches and basic blocks

14-Mar-18

Page 17: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Speedup ratio for H.264 and Optical Flowon ARM Cortex-A9 Android 3 coresby OSCAR Automatic Parallelization

1.00 1.35

1.53

1.00

1.99

2.78

0.00

0.50

1.00

1.50

2.00

2.50

3.00

1PE 2PE 3PE 1PE 2PE 3PE

H.264 decoder OpticalFlow

Spee

dup

ratio

aga

inst

1PE

14-Mar-18 17

Page 18: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Low-Power Optimization with OSCAR API

18

MT1

VC0

MT2

MT4MT3

Sleep

VC1

Scheduled Resultby OSCAR Compiler void

main_VC0() {

MT1

voidmain_VC1() {

MT2

#pragma oscar fvcontrol ¥(1,(OSCAR_CPU(),100))

#pragma oscar fvcontrol ¥((OSCAR_CPU(),0))

Sleep

MT4MT3

} }

Generate Code Image by OSCAR Compiler

14-Mar-18

Page 19: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

1.07 0.79

0.95 0.72

1.69

0.57

1.50

0.36

2.45

0.51

2.23

0.30

0.00

0.50

1.00

1.50

2.00

2.50

3.00

without power control with power control without power control with power control

H.264 Optical flow

Aver

age

Pow

er C

onsu

mpt

ion[

W]

1 core 2 cores 3 cores

1 1132 12 2 233 3

19

- 86.5%(1/7)

- 68.4%(1/3)

-79.2%(1/5)

-52.3%(1/2)

Automatic Power Reduction on ARM CortexA9 with Androidhttp://www.youtube.com/channel/UCS43lNYEIkC8i_KIgFZYQBQ

H.264 decoder & Optical Flow (on 3 cores)

ODROID X2Samsung Exynos4412 Prime, ARM Cortex-A9 Quad core1.7GHz〜0.2GHz, used by Samsung's Galaxy S3

Power for 3cores was reduced to 1/5~1/7 against without software power control Power for 3cores was reduced to 1/2~1/3 against ordinary 1core execution

14-Mar-18

Page 20: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

H.264 decoder & Optical Flow (3cores)

20

29.67

17.37

29.29

24.17

37.11

16.15

36.59

12.21

41.81

12.50

41.58

9.60

0.005.00

10.0015.0020.0025.0030.0035.0040.0045.00

without power control with power control without power control with power control

H.264 Optical flow

Aver

age

Pow

er C

onsu

mpt

ion[

W]

1 core 2 cores 3 cores

1 321 321 321 32

-70.1%(1/3)

-57.9%(2/5)

-76.9%(1/4)

-67.2%(1/3)

Automatic Power Reuction on Intel Haswell

Power for 3cores was reduced to 1/3~1/4 against without software power control Power for 3cores was reduced to 2/5~1/3 against ordinary 1core execution

H81M-A, Intel Core i7 4770kQuad core, 3.5GHz〜0.8GHz

14-Mar-18

Page 21: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Automatic Power Reduction of OpenCV Face Detection on big.LITTLE ARM Processor

• ODROID-XU3• Samsung Exynos 5422 Processor

• 4x Cortex-A15 2.0GHz, 4x Cortex-A7 1.4GHz big.LITTLE Architecture• 2GB LPDDR3 RAM Frequency can be changed by each

cluster unit

0

1

2

3

4

5

6

3PE 3PE

W/O Power Control W/ Power Control

Pow

er C

onsu

mpt

ion

[W]

Cortex-A7 Cortex-A15

4.9w

1.6w

-67% (1/3)

14-Mar-18 21

Page 22: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

14-Mar-18

110 Times Speedup against the Sequential Processing for GMS Earthquake Wave Propagation Simulation on Hitachi SR16000(Power7 Based 128 Core Linux SMP) (LCPC2015)

22

Fortran:15 thousand lines

First touch for distributed shared memory and cache optimization over loops are important for scalable speedup

Page 23: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Performance on Multicore Server for Latest Cancer Treatment Using Heavy Particle (Proton, Carbon Ion)

327 times speedup on 144 cores

Original sequential execution time 2948 sec (50 minutes) using GCC was reduced to 9 sec with 144 cores(327.6 times speedup) Reduction of treatment cost and reservation waiting period is expected

23

Hitachi 144cores SMP Blade Server BS500: Xeon E7-8890 V3(2.5GHz 18core/chip) x8 chip

1.00 5.00

109.20

196.50

327.60

0

50

100

150

200

250

300

350

1PE 32pe 64pe 144pe

327.6 times speed up with 144 cores

GCC

Page 24: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

OSCAR Heterogeneous Multicore

24

• DTU– Data Transfer

Unit• LPM

– Local Program Memory

• LDM– Local Data

Memory• DSM

– Distributed Shared Memory

• CSM– Centralized

Shared Memory• FVR

– Frequency/Voltage Control Register

14-Mar-18

Page 25: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

25

An Image of Static Schedule for Heterogeneous Multi-core with Data Transfer Overlapping and Power Control

CPU0

CORE DTU

CPU1

CORE DTU

CPU2

CORE DTU

CPU3

CORE DTU

DRP0

CORE DTU

MT1-1 MT1-2

LOAD LOADLOAD LOAD

MT1-3 MT1-4

SEND SEND

MT2-1

SEND

LOAD

SEND

MT2-2

LOAD

MT2-3

SEND

OFFOFF

OFF

MT3-1

LOAD

MT2-4MT3-2MT3-3

SEND

LOAD

LOAD

LOADLOAD

MT2-5

LOAD

MT2-6

SEND

LOAD

MT2-7

SEND

SEND

LOAD

OFF

SEND

MT3-5

LOAD

SEND

LOAD

LOAD

LOAD

MT3-8

SEND

OFFMT3-7

LOAD

MT2-8

SENDSEND

LOAD

OFFSTORE

STORESTORE

STORE

TIM

E

MTG1

MTG2 MTG3

MT3-4 MT3-6

14-Mar-18

Page 26: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

33 Times Speedup Using OSCAR Compiler and OSCAR API on RP-X

(Optical Flow with a hand-tuned library)

12.29 3.09

5.4

18.85

26.71

32.65

0

5

10

15

20

25

30

35

1SH 2SH 4SH 8SH 2SH+1FE 4SH+2FE 8SH+4FE

Spee

dups

aga

inst

a si

ngle

SH

pro

cess

or

3.4[fps]

111[fps]

14-Mar-18 26

Page 27: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Power Reduction in a real-time execution controlled by OSCAR Compiler and OSCAR API on RP-X

(Optical Flow with a hand-tuned library)

Without Power Reduction With Power Reductionby OSCAR Compiler

Average:1.76[W] Average:0.54[W]

1cycle : 33[ms]→30[fps]

70% of power reduction

14-Mar-18 27

Page 28: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Coarse grain task parallelization with earliest condition analysis (control and data dependency analysis to detect parallelism among coarse grain tasks).

OSCAR compiler automatically controls coherence using following simple program restructuring methods: To cope with stale data problems:

Data synchronization by compilers To cope with false sharing problem:

Data AlignmentArray PaddingNon-cacheable Buffer

14-Mar-18

Software Coherence Control Method on OSCAR Parallelizing Compiler

MTG generated by earliest executable condition analysis

28

Page 29: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Core #3

I$16K

D$16K

CPU FPU

User RAM 64K

Local memoryI:8K, D:32K

Core #2

I$16K

D$16K

CPU FPU

User RAM 64K

Local memoryI:8K, D:32K

Core #1

I$16K

D$16K

CPU FPU

User RAM 64K

Local memoryI:8K, D:32K

Core #0

I$16K

D$16K

CPU FPU

URAM 64K

Local memoryI:8K, D:32K

CCNBAR

8 Core RP2 Chip Block Diagram

On-chip system bus (SuperHyway)

DDR2LCPG: Local clock pulse generatorPCR: Power Control RegisterCCN/BAR:Cache controller/Barrier RegisterURAM: User RAM (Distributed Shared Memory)

Snoo

p co

ntro

ller

1

Snoo

p co

ntro

ller

0LCPG0

Cluster #0 Cluster #1

PCR3

PCR2

PCR1

PCR0

LCPG1

PCR7

PCR6

PCR5

PCR4

controlSRAM

controlDMA

control

Core #7

I$16K

D$16K

CPUFPU

User RAM 64KI:8K, D:32K

Core #6

I$16K

D$16K

CPUFPU

User RAM 64KI:8K, D:32K

Core #5

I$16K

D$16K

CPUFPU

User RAM 64KI:8K, D:32K

Core #4

I$16K

D$16K

CPUFPU

URAM 64K

Local memoryI:8K, D:32K

CCNBAR

Barrier Sync. Lines

14-Mar-18 29

Page 30: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Performance of Software Coherence Control by OSCAR Compiler on 8-core RP2

Automatic Software Coherent Control for Manycores

14-Mar-18 30

1.00

1.38

2.52

1.00

1.67

2.65

1.00

1.76

2.90

1.00

1.79

2.99

1.00

1.84

3.34

1.00

1.32

2.36

1.00

1.87

2.86

1.00

1.79

2.86

1.00

1.55

2.19

1.00

1.70

3.17

1.071.45

2.63

4.37

1.10

1.76

2.95

3.65

1.06

1.90

3.28

4.76

1.01

1.81

3.19

4.63

1.07

2.01

3.71

5.66

1.031.32

2.36

3.67

1.05

1.95

2.87

3.49

1.05

1.77

2.70

3.32

1.071.40

1.892.19

1.02

1.67

3.02

4.92

0.00

1.00

2.00

3.00

4.00

5.00

6.00

1 2 4 8 1 2 4 8 1 2 4 8 1 2 4 8 1 2 4 8 1 2 4 8 1 2 4 8 1 2 4 8 1 2 4 8 1 2 4 8

equake art lbm hmmer cg mg bt lu sp MPEG2Encoder

SPEC2000 SPEC2006 NPB MediaBench

Spee

dup

Application/the number of processor core

SMP(Hardware Coherence)

NCC(Software Coherence)

Page 31: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Automatic Local Memory ManagementData Localization: Loop Aligned Decomposition

• Decomposed loop into LRs and CARs– LR ( Localizable Region): Data can be passed through LDM– CAR (Commonly Accessed Region): Data transfers are

required among processors

31

Single dimension DecompositionMulti-dimension Decomposition

14-Mar-18

Page 32: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Adjustable Blocks

Handling a suitable block size for each application different from a fixed block size in cache each block can be divided into smaller blocks

with integer divisible size to handle small arrays and scalar variables

3214-Mar-18

Page 33: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Multi-dimensional Template Arrays for Improving Readability

• a mapping technique for arrays with varying dimensions– each block on LDM corresponds to

multiple empty arrays with varying dimensions

– these arrays have an additional dimension to store the corresponding block number

• TA[Block#][] for single dimension• TA[Block#][][] for double dimension• TA[Block#][][][] for triple dimension• ...

• LDM are represented as a one dimensional array– without Template Arrays, multi-

dimensional arrays have complex index calculations

• A[i][j][k] -> TA[offset + i’ * L + j’ * M + k’]– Template Arrays provide readability

• A[i][j][k] -> TA[Block#][i’][j’][k’] 33

LDM

14-Mar-18

Page 34: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Block Replacement Policy Compiler Control Memory block

Replacement using live, dead and reuse information of each

variable from the scheduled result different from LRU in cache that does not use

data dependence information Block Eviction Priority Policy

1. (Dead) Variables that will not be accessed later in the program

2. Variables that are accessed only by other processor cores

3. Variables that will be later accessed by the current processor core

4. Variables that will immediately be accessed by the current processor core

3414-Mar-18

Page 35: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Speedups by the Proposed Local Memory Management Compared with Utilizing Shared Memory on Benchmarks Application using RP2

35

20.12 times speedup for 8cores execution using local memory against sequential execution using off-chip shared memory of RP2 for the AACenc

14-Mar-18

Page 36: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Target: Solar Powered

Compiler power reduction.Fully automatic parallelization and vectorization including local memory management and data transfer.

OSCAR Vector Multicore and Compiler for Embedded to Severs with OSCAR Technology

Centralized Shared Memory

Compiler Co-designed Interconnection Network

Compiler co-designed Connection Network

On-chip Shared Memory

Multicore Chip

VectorData

TransferUnit

CPU

Local MemoryDistributed Shared Memory

Power Control Unit

Core

×4chips

14-Mar-18 36

Page 37: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

Future Multicore ProductsNext Generation Automobiles- Safer, more comfortable, energy efficient, environment friendly- Cameras, radar, car2car communication, internet information integrated brake, steering, engine, moter control

Solar powered with more than 100 times power efficient : FLOPS/W• Regional Disaster Simulators

saving lives from tornadoes, localized heavy rain, fires with earth quakes

Smart phones

37

Cancer treatment, Drinkable inner camera• Emergency solar powered• No cooling fun, No dust ,

clean usable inside OP room

Advanced medical systems Personal / Regional Supercomputers

14-Mar-18

-From everyday recharging to less than once a week- Solar powered operation inemergency condition- Keep health

Page 38: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

IEEE Computer Society

14-Mar-18 38

More than 60,000 computer scientist and IT professionals, in 168 countries driving technological innovation.

Our Vision:

To be the leading provider of technical information, community services, and personalized services to the world’s computing professionals.

Page 39: OSCAR Automatic Parallelizing and Power Reducing Multicore … › achieve › pdf › y2018 › IPSJKa... · 2018-05-15 · 14-Mar-18 OSCAR Automatic Parallelizing and Power Reducing

IEEE Computer Society Student Membership

14-Mar-18 39

IEEE + Computer Society

Japan = US $35 (Half year: US$17)• Already an IEEE member = US$8 (Half year: US$4 )Full member benefits• Included Access to Computer Society Digital Library

13 Magazines | 20 Journals | 600,000 Searchable Articles | 569,000 Authors | 9,000 Conference Publications

• Discounts on all IEEE Computer Society Conferences & Events• Scholarships• Opportunities to publish and be recognized• Skill development• Refine your interests• Make connections and assemble your network• Growing IEEE young professional network