Legion Overview - Legion Programming System

8m ago
27 Views
1 Downloads
1.56 MB
32 Pages
Last View : 9d ago
Last Download : 4m ago
Upload by : Kairi Hasson
Transcription

Legion Overview Alex Aiken December 4, 2014 http://legion.stanford.edu 1

Logistics Wireless Choose “Stanford Visitor” network, follow directions Bootcamp slides @ legion.stanford.edu Thursday Extending the schedule by 15 minutes Parking Lunch Dinner Friday Different building: Gates 505 December 4, 2014 http://legion.stanford.edu 2

Team Alex Aiken Mike Bauer (Nvidia) Zhihao Jia Wonchan Lee Elliott Slaughter Sean Treichler December 4, 2014 Charles Ferenbaugh Sam Gutierrez Pat McCormick http://legion.stanford.edu 3

Legion A programming model for heterogeneous, distributed machines Heterogeneous Mixed CPUs and GPUs Distributed Large spread, and variability, of communication latencies Caches, RAM, NUMA, network, December 4, 2014 http://legion.stanford.edu 4

One Slide History Started in 2011 First version in 2012 S3D implementation in 2013 Collaboration with Jackie Chen’s group at Sandia Part of the ExaCT Center Drove many feature changes/additions And many optimizations/improvements Emphasis on scaling up in 2014 S3D on 8,000 Titan nodes December 4, 2014 http://legion.stanford.edu 5

Legion S3D Heptane Performance 1.73X - 2.85X faster between 1024 and 8192 nodes Throughput Per Node (Points/s) 200000 150000 100000 50000 0 1 Titan Legion 483 Keeneland Legion 483 Titan OpenACC 483 Titan Legion 64 3 Keeneland Legion 64 3 Titan OpenACC 643 Titan Legion 96 3 Keeneland Legion 96 3 2 4 8 16 32 64 128 256 Nodes December 4, 2014 http://legion.stanford.edu 512 1024 2048 4096 8192 6

Bootcamp Focus Writing Legion programs Different from the academic papers Cover many pragmatic, usability aspects This morning: The programming model Tasks, regions, mapping This afternoon: Everything else Structuring applications Debugging & profiling Tomorrow: Working with application groups December 4, 2014 http://legion.stanford.edu 7

Philosophy Designed to be a real programming system Good abstractions, clear semantics But can also “open the hood” Ways to drop down to lower-levels of abstraction Within the programming model December 4, 2014 http://legion.stanford.edu 8

Example Code December 4, 2014 http://legion.stanford.edu 9

First Point Legion has a sequential semantics Easy to reason about But see discussion of advanced features this afternoon Not like MPI OpenACC CUDA December 4, 2014 http://legion.stanford.edu 10

Second Point A programming model embedded in C but see discussion of future Legion compiler later today December 4, 2014 http://legion.stanford.edu 11

Third Point A runtime system All decisions are made dynamically Again, see discussion of Legion compiler December 4, 2014 http://legion.stanford.edu 12

Tasks A task is The unit of parallel computation in Legion Takes regions (typed collections) as arguments Can launch subtasks December 4, 2014 http://legion.stanford.edu 13

Task Tree T T T T T T T T Legion programs can launch arbitrary trees of tasks By default, execute in the order launched Runtime system automatically identifies parallel tasks December 4, 2014 http://legion.stanford.edu 14

Regions: Index & Field Spaces 11 2 3 . . . N December 4, 2014 x Field http://legion.stanford.edu 15

Regions Voltage Capac. Induct. Charge Two Dimensions Node Unbounded set of rows Node Node Bounded set of columns Fields Node Node Node Tasks declare Which fields they use And how they use them Node Node Node Regions can be partitioned December 4, 2014 Node http://legion.stanford.edu 16

Partitioning N P December 4, 2014 S http://legion.stanford.edu 17

Partitioning N P p1 December 4, 2014 S pn s1 sn g1 gn http://legion.stanford.edu 18

Organize Into Pieces N P p1 December 4, 2014 S pn s1 http://legion.stanford.edu sn g1 gn 19

Embedded in C Can write any C code within a task Local state, pointers, etc. Must follow discipline when using Legion API Regions are first class Can be passed as arguments, stored in data structures December 4, 2014 http://legion.stanford.edu 20

Populating Regions Can’t read/update a region without an instance Instances hold a valid current copy of the data December 4, 2014 http://legion.stanford.edu 21

Populating Regions To read/update a region, need an accessor A handle to reference, or iterate through, elements December 4, 2014 http://legion.stanford.edu 22

Regions: Privileges & Coherence December 4, 2014 http://legion.stanford.edu 23

Back to the Simulation One task per circuit piece Read/Write on wires pieces Read Only on everything else December 4, 2014 http://legion.stanford.edu 24

The Crux Crucial design decisions in a Legion program are: What are the regions? How are the regions partitioned into subregions? What are the tasks? How are the tasks decomposed into subtasks? Often tension between the two These decisions drive the program’s design December 4, 2014 http://legion.stanford.edu 25

Summary The programmer Describes the structure of the program’s data Regions The tasks that operate on that data The Legion implementation Guarantees tasks appear to execute in sequential order Ensures tasks have valid versions of their regions December 4, 2014 http://legion.stanford.edu 26

Mapping Interface Programmer selects: rc Where tasks run Where regions are placed Mapping computed dynamically Decouple correctness from performance t1 t2 t3 t4 t5 rw1 rw2 x86 x86 x86 x86 CUDA December 4, 2014 rw http://legion.stanford.edu rn rn1 rn2 N U M A N U M A FB D R A M 27 27

Mapping Mapper interface callback interface Legion runtime calls user-supplied methods Can do arbitrary computation to make decisions But often very simple December 4, 2014 http://legion.stanford.edu 28

The Crux, Revisited Crucial design decisions in a Legion program are What are the regions? What are the tasks? In particular, mapping decisions depend on design of the regions and tasks Not the other way around December 4, 2014 http://legion.stanford.edu 29

Debugging December 4, 2014 http://legion.stanford.edu 30

LegionProf (Heptane 483) Dynamic Analysis for (rhsf 2) Clean-up/meta tasks 4 AMD Interlagos Integer cores for Legion Runtime 8 AMD Interlagos FP cores for application NVIDIA Kepler K20 December 4, 2014 http://legion.stanford.edu 31

Questions? December 4, 2014 http://legion.stanford.edu 32

December 4, 2014 6 http://legion.stanford.edu Legion S3D Heptane Performance 1.73X - 2.85X faster between 1024 and 8192 nodes 1 2 4 8 16 32 64 128 256 512 1024 2048 .

Related Documents:

1.2. The Royal Charter was granted in 1925 and, on the Legion’s 50th Anniversary in 1971, the British Legion became The Royal British Legion. 1.3. By the time of the Legion's formation in 1921, the tradition of an annual Two Minutes Silence in memory of the dead had been established. The first ever Poppy Appeal was

The American Legion 2019. Officer’s Guide. AND MANUAL OF CEREMONIES. Due to the July 30, 2019, signing of the . Let Everyone Get Involved with Opportunities for National Service – The LEGION ACT – eligibility for membership in The American Legion has been changed from the former s

It is in every sense an “Auxiliary” to the work of The American Legion, one of its first acts was to adopt The American Legion. Its members serve side-by-side with members an emblem similar to that of the Legion, yet distinctive and tr of The American Legion in a spirit of un

Mary’s Notebook Issue 4, August 2006 page 1 of 1 0DU\·V1RWHERRN August 2006 www.legionofmarytidewater.com Issue 4 Section Page Front Page 1 News & Events 2 Handbook Study 3 Faith Focus 4 Growing in Love 5 Object of the Legion of Mary “The object of the Legion of Mary

About this Programming Manual The PT Programming Manual is designed to serve as a reference to programming the Panasonic Hybrid IP-PBX using a Panasonic proprietary telephone (PT) with display. The PT Programming Manual is divided into the following sections: Section 1, Overview Provides an overview of programming the PBX. Section 2, PT Programming

About this Programming Manual The PC Programming Manual is designed to serve as a system programming reference for the Panasonic Pure IP-PBX. It explains how to programme this PBX using the Maintenance Console software. The PC Programming Manual is divided into the following sections: Section 1, Overview Provides an overview of programming the PBX.

2 PC Programming Manual Introduction About this Programming Manual The PC Programming Manual is designed to serve as a system programming reference for the Panasonic Hybrid IP-PBX. It explains how to programme this PBX using the Maintenance Console software. The PC Programming Manual is divided into the following sections: Section 1, Overview

language of instruction was a common problem identified by many. Based on this issue a research investigation with the aim of raising teacher awareness of the strategies and techniques that could be used to support the language development of young learners was conducted. The Research Investigation . In 2010, a research project funded by a grant from the Jeff Thompson Award, was conducted to .