tutorial: preesm - dataflow programming of multicore dsps€¦ · institut d’Électronique et de...

26
Milano Sept. 11 th 2014 INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES 1 Tutorial: PREESM - Dataflow Programming of Multicore DSPs Karol Desnos, Clément Guy, Maxime Pelcat EDERC 2014 Conference, Milan, September 11 th

Upload: others

Post on 23-Sep-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

1

Tutorial:

PREESM - Dataflow Programming of

Multicore DSPs

Karol Desnos, Clément Guy, Maxime Pelcat

EDERC 2014 Conference, Milan, September 11th

Page 2: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

2

PREESM

http://preesm.sourceforge.net/website

• Eclipse-based Tool

• Written in Java and Xtend

• Using

– Eclipse Modeling Framework,

– Eclipse Graphiti,

– Eclipse CDT

• Compatible and tested on Linux and Windows

• Release 2.0.0 on sept 2014

Page 3: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

3

PREESM

• Started in 2007

• In collaboration with Texas Instruments France

• 16 contributors

• Academic collaborations

– LAAS

– University of Maryland

– ENIS

– Abo Akademi

Page 4: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

4

PREESM Workflow

• Preesm offers Editors

– Algorithm

– Architecture

– Scenario

• And can run a Workflow

– Transformations of models

Page 5: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

5

PREESM Workflow

Page 6: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

6

PREESM Workflow

Page 7: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

7

PREESM Workflow

Page 8: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

8

PREESM Workflow

Page 9: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

9

PREESM Workflow

Page 10: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

10

PREESM Workflow

Page 11: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

11

PREESM Workflow

Page 12: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

12

PREESM Workflow

• A workflow runs typically within a few tens of seconds

• Algorithm: typically 10-1500 actors

• Architecture: typically 1-20 cores

Page 13: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

13

Examples for the tutorial

Algorithms

Sobel filter: edge detection

Stereo matching: disparity map

Architectures

Intel i7 quad-core

TI Shannon (C6678)

Page 14: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

14

Rapid prototyping process

Algorithm

modeling

Architecture

modeling

Scenario

selection

Workflow

composition

Workflow

execution

Page 15: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

15

Algorithm modeling

PiSDF

Parameterized

Dynamism

interfaced

Hierarchy & Composition

Synchronous Data-Flow

Actors & Fifos

Page 16: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

16

Algorithm examples

Sobel filter

Stereo matching

Read Display Filter

Size

1 Size Size

Size

Size

Size

Page 17: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

17

Arcitecture modeling

S-LAM

System-Level Architecture Model

Processing elements

Communication nodes

Page 18: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

18

Architecture examples

Intel i7 quad-core

TI Shannon (C6678)

DDR3

core1

core2

core3

MSMC

core5

core6

core7

5.3 GB/s

16 GB/s

core4 core8

Page 19: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

19

Scenario selection

Link between algorithm & architecture

Execution times

Execution constraints

Simulation information

Enables separation of concerns

Page 20: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

20

Scenario example

Sobel filter on Intel i7 quad-core

Read 1

core1

Size

190000

cycles = 101376

Page 21: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

21

Workflow composition

Rapid prototyping tasks

Scheduling

Code generation

Memory optimization

Vizualization tools

Page 22: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

22

Workflow examples

2 workflows

Scheduling

Scheduling + code generation

Single-rate

transformation Hierarchy

flattening

Mapping &

scheduling

Algorithm

Architecture

Page 23: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

23

Let’s complicate things

Small application on CPU

What about more realistic cases? Execution on DSP (C6678)

Stereo matching algorithm

Page 24: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

24

PREESM for the DSP Programmer

Rapid prototyping for multicore DSPs High-level modeling of parallelism

Automatic mapping

Automatic scheduling

Automatic code generation

Advanced memory optimization

Bridges to UML MARTE, SDF3 & Orcc

Page 25: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

25

PREESM is constantly improving

Research tool

New models & features

Regular enhancements

Incoming features Parameter-dependent timings

Distributed memory management

Bridge to DIF from Univ. of Maryland

GUI enhancements (workflow scripts)

Page 26: Tutorial: PREESM - Dataflow Programming of Multicore DSPs€¦ · INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES PREESM • Started in 2007 • In collaboration with

Milano – Sept. 11th 2014

INSTITUT D’ÉLECTRONIQUE ET DE TÉLÉCOMMUNICATIONS DE RENNES

26

preesm.sourceforge.net/website/ Twitter: @PreesmProject

Multi-Core Scheduling

Static Code Generation

Program Program Program

Program

Hierarchical Algorithm Model

Multi-core Heterogeneous Model

ScenarioA

D B

E

C

Simulationo1

o2

A B C

D E

Deployment

Thank you for your attention