heterogeneous computing (hc) & micro-heterogeneous...

68
EECC722 - Shaaban EECC722 - Shaaban #1 Lec # 12 Fall 2003 11-3-2003 Heterogeneous Computing (HC) & Micro-Heterogeneous Computing (MHC) High Performance Computing Trends Steps in Creating a Parallel Program Factors Affecting Parallel System Performance Scalable Distributed Memory Processors: MPPs & Clusters Limitations of Computational-mode Homogeneity in Parallel Architectures Heterogeneous Computing (HC) Proposed Computing Paradigm: Micro-Heterogeneous Computing (MHC) Example Suitable MHC PCI-based Devices Framework of Proposed MHC Architecture Design Considerations of MHC-API Analytical Benchmarking & Code-Type Profiling in MHC Formulation of Mapping Heuristics For MHC Initial MHC Scheduling Heuristics Developed Modeling & Simulation of MHC Framework Preliminary Results Future Work in MHC.

Upload: others

Post on 30-May-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#1 Lec # 12 Fall 2003 11-3-2003

Heterogeneous Computing (HC)& Micro-Heterogeneous Computing (MHC)

• High Performance Computing Trends

• Steps in Creating a Parallel Program– Factors Affecting Parallel System Performance

• Scalable Distributed Memory Processors: MPPs & Clusters

• Limitations of Computational-mode Homogeneity in Parallel Architectures• Heterogeneous Computing (HC)

• Proposed Computing Paradigm: Micro-Heterogeneous Computing (MHC)

– Example Suitable MHC PCI-based Devices– Framework of Proposed MHC Architecture

– Design Considerations of MHC-API

– Analytical Benchmarking & Code-Type Profiling in MHC– Formulation of Mapping Heuristics For MHC

– Initial MHC Scheduling Heuristics Developed

– Modeling & Simulation of MHC Framework– Preliminary Results

• Future Work in MHC.

Page 2: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#2 Lec # 12 Fall 2003 11-3-2003

High Performance Computing (HPC) Trends• Demands of engineering and scientific applications is growing in terms of:

– Computational and memory requirements– Diversity of computation modes present.

• Such demands can only be met efficiently by using large-scale parallel systems thatutilize a large number of high-performance processors with additional diversemodes of computations supported.

• The increased utilization of commodity of-the-shelf (COTS) components in highperformance computing systems instead of costly custom components.

– Commercial microprocessors with their increased performance and low costalmost replaced custom processors used in traditional supercomputers.

• Cluster computing that entirely uses COTS components and royalty-free software isgaining popularity as a cost-effective high performance alternative to commercial“Big-Iron” solutions: Commodity Supercomputing.

• The future of high performance computing relies on the efficient use of clusters withsymmetric multiprocessor (SMP) nodes and scalable interconnection networks.

• General Purpose Processors (GPPs) used in such clusters are not suitable forcomputations that have diverse computational mode requirements such as digitalsignal processing, logic-intensive, or data parallel computations. Such applications,when run on clusters, currently only achieve a small fraction of the potential peakperformance.

Page 3: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#3 Lec # 12 Fall 2003 11-3-2003

High Performance Computing Application Areas

• Astrophysics

• Atmospheric and Ocean Modeling• Bioinformatics

• Biomolecular simulation: Protein folding

• Computational Chemistry• Computational Fluid Dynamics

• Computational Physics

• Computer vision and image understanding• Data Mining and Data-intensive Computing

• Engineering analysis (CAD/CAM)

• Global climate modeling and forecasting• Material Sciences

• Military applications

• Quantum chemistry• VLSI design

• ….From 756

Page 4: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#4 Lec # 12 Fall 2003 11-3-2003

Scientific Computing Demands

From 756

Page 5: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#5 Lec # 12 Fall 2003 11-3-2003

LINPAK Performance TrendsLI

NP

AC

K (M

FLO

PS

)

s

s

s

s

s

s

u

u

u

uu

u

uu

u

u u

1

10

100

1,000

10,000

1975 1980 1985 1990 1995 2000

sCRAYn = 100nCRAYn = 1,000

uMicron = 100lMicron = 1,000

CRAY 1s

Xmp/14se

Xmp/416Ymp

C90

T94

DEC 8200

IBM Power2/990MIPS R4400

HP9000/735DEC Alpha

DEC Alpha AXPHP 9000/750

IBM RS6000/540

MIPS M/2000

MIPS M/120

Sun 4/260

n

nn

n

n

n

l

l

l

l l

lll

ll

l

LIN

PA

CK

(G

FLO

PS

)

nCRAY peaklMPP peak

Xmp/416(4)

Ymp/832(8) nCUBE/2(1024)iPSC/860

CM-2CM-200

Delta

Paragon XP/S

C90(16)

CM-5

ASCI Red

T932(32)

T3D

Paragon XP/S MP (1024)

Paragon XP/S MP (6768)

n

n

n

n

l

l

nl

l

l

ll

l

ll

0.1

1

10

100

1,000

10,000

1985 1987 1989 1991 1993 1995 1996

Uniprocessor PerformanceUniprocessor Performance Parallel System PerformanceParallel System PerformanceFrom 756

Page 6: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#6 Lec # 12 Fall 2003 11-3-2003

Peak FP Performance Trends

Petaflop

Teraflop

From 756

Page 7: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#7 Lec # 12 Fall 2003 11-3-2003

Steps in Creating Parallel Programs

P0

Tasks Processes Processors

P1

P2 P3

p0 p1

p2 p3

p0 p1

p2 p3

Partitioning

Sequentialcomputation

Parallelprogram

Assignment

Decomposition

Mapping

Orchestration

• 4 steps: Decomposition, Assignment, Orchestration, Mapping

– Done by programmer or system software (compiler, runtime, ...)

From 756

Page 8: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#8 Lec # 12 Fall 2003 11-3-2003

Levels of Parallelism in Program Execution

Jobs or programs (Multiprogramming)Level 5

Subprograms, job steps or related parts of a program

Level 4

Procedures, subroutines, or co-routines

Level 3

Non-recursive loops or unfolded iterations

Level 2

Instructions or statements

Level 1

Increasing communicationsdemand and mapping/scheduling overhead }

}Higherdegree ofParallelism

MediumGrain

CoarseGrain

FineGrain

< 20

< 500

< 2000

}

From 756

Page 9: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#9 Lec # 12 Fall 2003 11-3-2003

Parallel Program Performance Goal

• Parallel processing goal is to maximize speedup:

• Ideal Speedup = p = number of processors

• By:– Balancing computations on processors (every processor does the same

amount of work).

– Minimizing communication cost and other overheads associated with eachstep of parallel program creation and execution.

• Performance Scalability: Achieve a good speedup for the parallel application on the parallel

architecture as problem size and machine size (number of processors) areincreased.

Sequential Work on one processor

Max (Work + Synch Wait Time + Comm Cost + Extra Work)Speedup = <

Time(1)

Time(p)Parallelization overheads

From 756

Page 10: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#10 Lec # 12 Fall 2003 11-3-2003

Factors Affecting Parallel System Performance• Parallel Algorithm-related:

– Available concurrency and profile, grain, uniformity, patterns.– Required communication/synchronization, uniformity and patterns.– Data size requirements.– Communication to computation ratio.

• Parallel program related:– Programming model used.– Resulting data/code memory requirements, locality and working set

characteristics.– Parallel task grain size.– Assignment/mapping: Dynamic or static.– Cost of communication/synchronization.

• Hardware/Architecture related:– Total CPU computational power available.– Types of computation modes supported.– Shared address space Vs. message passing.– Communication network characteristics (topology, bandwidth, latency)– Memory hierarchy properties.

From 756

Page 11: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#11 Lec # 12 Fall 2003 11-3-2003

IdealSpeedup

Reality of Parallel Algorithm &Communication/Overheads Interaction

From 756

Page 12: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#12 Lec # 12 Fall 2003 11-3-2003

Classification of Parallel Architectures• Single Instruction Multiple Data (SIMD):

– A single instruction manipulates many data items in parallel. Include:

• Array processors: A large number of simple processing units, ranging from1,024 to 16,384 that all may execute the same instruction on different data inlock-step fashion (Maspar, Thinking Machines CM-2).

• Traditional vector supercomputers:– First class of supercomputers introduced in 1976 (Cray 1)

– Dominant in high performance computing in the 70’s and 80’s

– Current vector supercomputers: Cray SV1, Fujitsu VSX4, NEC SX-5

– Suitable for fine grain data parallelism.– Parallel Programming: Data parallel programming model using

vectorizing compilers, High Performance Fortran (HPF).

– Very high cost due to utilizing custom processors and system componentsand low production volume.

• Do not fit current incremental funding models.

– Limited system scalability.

– Short useful life span.From 756

Page 13: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#13 Lec # 12 Fall 2003 11-3-2003

Classification of Parallel Architectures• Multiple Instruction Multiple Data (MIMD):

– These machines execute several instruction streams in parallel on different data.

– Shared Memory or Symmetric Memory Processors (SMPs):

• Systems with multiple tightly coupled CPUs (2-64) all of which share the samememory, system bus and address space.

• Suitable for tasks with medium/coarse grain parallelism.

• Parallel Programming: Shared address space multithreading using POSIX Threads(pthreads) or OpenMP.

– Scalable Distributed Memory Processors:

• Include commercial Massively Parallel Processor systems (MPPs) and computerclusters.

• A large number of computing nodes (100s-1000s). Usually each node ia a small scale(2-4 processor) SMPs connected using a scalable network.

• Memory is distributed among the nodes. CPUs can only directly access local memoryin their node.

• Parallel Programming: Message passing over the network using Parallel VirtualMachine (PVM) or Message Passing Interface (MPI)

• Suitable for large tasks with coarse grain parallelism and low communication tocomputation ratio.From 756

Page 14: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#14 Lec # 12 Fall 2003 11-3-2003

Scalable Distributed Memory Processors:MPPs & Clusters

MPPs vs. Clusters• MPPs: “Big Iron” machines

– COTS components usually limitedto using commercial processors.

– High system cost

• Clusters: Commodity Supercomputing– COTS components used for all

system components.– Lower cost than MPP solutions

° ° °

Scalable network

CA

P

$

Switch

M

Switch Switch

Scalable Network:Low latencyHigh bandwidthMPPs: CustomClusters: COTS

•Gigabit Ethernet•System AreaNetworks (SANS)

• ATM• Myrinet• SCI

Node: O(10) SMPMPPs: Custom nodeClusters: COTS node(workstations or PCs)

Custom-designed CPU?MPPs: Custom or commodityClusters: commodity

Operating system?MPPs: ProprietaryClusters: royalty-free (Linux)

Communication Assist:MPPs: CustomClusters: COTS

Distributed Memory

Parallel Programming:

Between nodes: Message passing using PVM, MPI

In SMP nodes: Multithreading using Pthreads, OpenMP

From 756

Page 15: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#15 Lec # 12 Fall 2003 11-3-2003

A Major Limitation of HomogeneousSupercomputing Systems

• Traditional homogeneous supercomputing system architectures usuallysupport a single homogeneous mode of parallelism including: SingleInstruction Multiple Data (SIMD), Multiple Instruction Multiple Data(MIMD), and vector processing.

• Such systems perform well when the application contains a single modeof parallelism that matches the mode supported by the system.

• In reality, many supercomputing applications have subtasks withdifferent modes of parallelism.

• When such applications execute on a homogeneous system, the machinespends most of the time executing subtasks for which it is not wellsuited.

• The outcome is that only a small fraction of the peak performance ofthe machine is achieved.

• Image understanding is an example application that requires differenttypes of parallelism.

Page 16: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#16 Lec # 12 Fall 2003 11-3-2003

Computational-mode Homogeneityof Cluster Nodes

• With the exception of amount of local memory, speed variations, andnumber of processors in each node, the computing nodes in a cluster arehomogeneous in terms of computational modes supported.

– This is due to the utilization of general-purpose processors (GPPs) that offer asingle mode of computation as the only computing elements available to userprograms.

• GPPs are designed to offer good performance for a wide variety ofcomputations, but are not optimized for tasks with specialized and diversecomputational requirements such as such as digital signal processing, logic-intensive, or data parallel computations.

• This limitation is similar to that in homogeneous supercomputing systems,and results in computer clusters achieving only a small fraction of theirpotential peak performance when running tasks that require differentmodes of computation– This severely limits computing scalability for such applications.

Page 17: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#17 Lec # 12 Fall 2003 11-3-2003

Heterogeneous Computing (HC)• Heterogeneous Computing (HC), addressees the issue of computational

mode homogeneity in supercomputers by:– Effectively utilizing a heterogeneous suite of high-performance autonomous

machines that differ in both speed and modes of parallelism supported tooptimally meet the demands of large tasks with diverse computationalrequirements.

– A network with high-bandwidth low-latency interconnects handles theintercommunication between each of the machines.

– Heterogeneous computing is often referred to as Heterogeneoussupercomputing (HSC) reflecting the fact that the collection of machinesused are usually supercomputers.

Paper HC-1, 2

Page 18: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#18 Lec # 12 Fall 2003 11-3-2003

Motivation For Heterogeneous Computing

• Hypothetical example of the advantage of using a heterogeneous suiteof machines, where the heterogeneous suite time includes inter-machine communication overhead. Not drawn to scale.

Paper HC-2

Page 19: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#19 Lec # 12 Fall 2003 11-3-2003

Heterogeneous Computing Example Application:Image Understanding

• Highest Level (Knowledge Processing):– Uses the results from the lower levels to infer

semantic attributes of an image– Requires coarse-grained loosely coupled

MIMD machines.

• Intermediate Level (SymbolicProcessing):

– Grouping and organization of featuresextracted.

– Communication is irregular, parallelismdecreases as features are grouped.

– Best suited to medium-grained MIMDmachines.

• Lowest Level (Sensory Processing):– Consists of pixel-based operators and pixel

subset operators such as edge detection– Highest amount of data parallelism– Best suited to mesh connected SIMD

machines or other data parallel arch.Paper HC-1

Page 20: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#20 Lec # 12 Fall 2003 11-3-2003

Heterogeneous Computing Broad Issues

• Analytical benchmarking

• Code-Type or task profiling

• Matching and Scheduling (mapping)

• Interconnection requirements• Programming environments.

Page 21: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#21 Lec # 12 Fall 2003 11-3-2003

Steps of Applications Processing in Heterogeneous Computing (HC)

• Analytical Benchmarking:– This step provides a measure of how well a given machine is able to perform when running a

certain type of code.– This is required in HC to determine which types of code should be mapped to which

machines.

• Code-type Profiling:– Used to determine the type and fraction of processing modes that exist in each program

segment.– Needed so that an attempt can be made to match each code segment with the most efficient

machine.

• Task Scheduling: tasks are mapped to a suitable machine using some form of schedulingheuristic

• Task Execution: the tasks are executed on the selected machine

Page 22: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#22 Lec # 12 Fall 2003 11-3-2003

HC Issues: Analytical Benchmarking

• Measure of how well a given machine is able to perform on a certaintype of code

• Required in HC to determine which types of code should be mappedto which machines

• Analytical benchmarking is an offline process• Example results:

– SIMD machines are well suited for matrix computations / low levelimage processing

– MIMD machines are best suited for tasks that have limitedintercommunication

Page 23: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#23 Lec # 12 Fall 2003 11-3-2003

HC Issues: Code-type Profiling

• Used to determine the types of parallelism in the codeas well as the amount of computation andcommunication present between tasks.

• Tasks are separated into segments which contain ahomogeneous type of parallelism.

• These segments can then be matched to a particularmachine that is best suited to execute them.

• Code-type profiling is also an offline process.

Page 24: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#24 Lec # 12 Fall 2003 11-3-2003

Code-Type Profiling Example

• Example results fromthe code-type profilingof a task.

• The task is broken intoS segments, each ofwhich containsembedded homogeneousparallelism.

Paper HC-1, 2

Page 25: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#25 Lec # 12 Fall 2003 11-3-2003

HC Task Matching and Scheduling (Mapping)

• Task matching involves assigning a task to a suitable machine.

• Task scheduling on the assigned machine determines the order of execution of thattask.

• The process of matching and scheduling tasks onto machines is called mapping.

• Goal of mapping is to maximize performance by assigning code-types to the bestsuited machine while taking into account the costs of the mapping includingcomputation and communication costs based on information obtained fromanalytical benchmarking, code-type profiling and possibly system workload.

• The problem of finding optimal mapping has been shown in general to be NP-complete even for homogeneous environments.

• For this reason, the development of heuristic mapping and scheduling techniquesthat aim to achieve “good” sub-optimal mappings is an active area of researchresulting in a large number of heuristic mapping algorithms for HC.

• Two different types of mapping heuristics for HC have been proposed, static ordynamic.

Paper HC-1, 2, 3, 4, 5, 6

Page 26: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#26 Lec # 12 Fall 2003 11-3-2003

Static Mapping Heuristics:

• Most such heuristic algorithms developed for HC are static and assume theETC (expected time to compute) for every task on every machine to be knownfrom code-type profiling and analytical benchmarking and not change at runtime.

• In addition many such heuristics assume large independent or meta-tasks thathave no data dependencies .

• Even with these assumptions static heuristics have proven to be effective formany HC applications.

Dynamic Mapping Heuristics:

• Mapping is performed on-line taking into account current system workload.

• Research on this type of heuristics for HC is fairly recent and is motivated byutilizing the heterogeneous computing system for real-time applications.

HC Task Matching and Scheduling (Mapping)

Static: HC-3, 4, 5Dynamic: HC-6

Page 27: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#27 Lec # 12 Fall 2003 11-3-2003

Example Static Scheduling Heuristics for HC

• Opportunistic Load Balancing (OLB): assigns each task, in arbitrary order, to thenext available machine.

• User-Directed Assignment (UDA): assigns each task, in arbitrary order, to themachine with the best expected execution time for the task.

• Fast Greedy : assigns each task, in arbitrary order, to the machine with theminimum completion time for that task.

• Min-min : the minimum completion time for each task is computed respect to allmachines. The task with the overall minimum completion time is selected andassigned to the corresponding machine. The newly mapped task is removed, and theprocess repeats until all tasks are mapped.

• Max-min : The Max-min heuristic is very similar to the Min-min algorithm. The setof minimum completion times is calculated for every task. The task with overallmaximum completion time from the set is selected and assigned to thecorresponding machine.

• Greedy or Duplex: The Greedy heuristic is literally a combination of the Min-minand Max-min heuristics by using the better solution

Paper HC-3, 4

Page 28: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#28 Lec # 12 Fall 2003 11-3-2003

• GA : The Genetic algorithm (GA) is used for searching large solution space. Itoperates on a population of chromosomes for a given problem. The initial populationis generated randomly. A chromosome could be generated by any other heuristicalgorithm.

• Simulated Annealing (SA): an iterative technique that considers only one possiblesolution for each meta-task at a time. SA uses a procedure that probabilisticallyallows solution to be accepted to attempt to obtain a better search of the solutionspace based on a system temperature.

• GSA : The Genetic Simulated Annealing (GSA) heuristic is a combination of theGA and SA techniques.

• Tabu : Tabu search is a solution space search that keeps track of the regions of thesolution space which have already been searched so as not to repeat a search nearthese areas .

• A* : A* is a tree search beginning at a root node that is usually a null solution. Asthe tree grows, intermediate nodes represent partial solutions and leaf nodesrepresent final solutions. Each node has a cost function, and the node with theminimum cost function is replaced by its children. Any time a node is added, the treeis pruned by deleting the node with the largest cost function. This process continuesuntil a complete mapping (a leaf node) is reached.

Example Static Scheduling Heuristics for HC

Paper HC-3, 4

Page 29: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#29 Lec # 12 Fall 2003 11-3-2003

Example Static Scheduling Heuristics for HC:The Segmented Min-Min Algorithm

• Every task has a ETC (expected time to compute) ona specific machine.

• If there are t tasks and m machines, we can obtain a t x mETC matrix.– ETC(i; j) is the estimated execution time for task i on machine j.

• The Segmented min-min algorithm sorts the tasks according toETCs.

• The tasks can be sorted into an ordered list by the averageETC, the minimum ETC, or the maximum ETC.

• Then, the task list is partitioned into segments with the equalsize.

• Each segment is scheduled in order using the standard Min-Min heuristic.

Paper HC-4

Page 30: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#30 Lec # 12 Fall 2003 11-3-2003

Segmented Min-Min Scheduling Heuristic

Paper HC-4

Page 31: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#31 Lec # 12 Fall 2003 11-3-2003

Example Dynamic Scheduling Heuristics for HC:HEFT Scheduling Heuristic

HEFT = Heterogeneous Earliest-Finish-Time

Paper HC-5

Page 32: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#32 Lec # 12 Fall 2003 11-3-2003

Heterogeneous Computing System InterconnectRequirements

• In order to realize the performance improvements offered by heterogeneouscomputing, communication costs must be minimized.

• The interconnection medium must be able to provide high bandwidth (multiplegigabits per second per link) at a very low latency.

• It must also overcome current deficiencies such as the high overheads incurredduring context switches, executing high-level protocols on each machine, ormanaging large amounts of packets.

• While the use of Ethernet-based LANs has become commonplace, these types ofnetwork interconnects are not well suited to heterogeneous supercomputers(high latency).

• This requirement of HC led to the development of cost-effective scalable systemarea networks (SANS) that provide the required high bandwidth, low latency,and low protocol overheads including Myrinet and Dolphin SCI interconnects.

• These system interconnects developed originally for HC, currently form themain interconnects in high performance cluster computing.

Page 33: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#33 Lec # 12 Fall 2003 11-3-2003

Example SAN: Myrinet

• CLOS Topology• 17.0µs (ping-pong) latency• 2 Gigabit, Full Duplex• 66 MHz, 64 Bit PCI• eMPI (OS bypassing)• $1500 per node• $32,000 per 64 port switch• $51,200 per 128 port switch• 512 nodes is common• Scalable up to 8192 nodes or

higher• Sample total cluster cost:

– 64 2.8GHz Intel Xeonprocessor (32 2-way SMPnodes) = $100k

Page 34: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#34 Lec # 12 Fall 2003 11-3-2003

Development of Message PassingEnvironments for HC

• Since the suite of machines in a heterogeneous computing system areloosely coupled and do not share memory, communication between thecooperating subtasks must be achieved by exchanging messages over thenetwork.

• This requirement led to the development of a number of platform-independent message-passing programming environments that provide thesource-code portability across platforms.

• Parallel Virtual Machine (PVM), and Message Passing Interface (MPI) arethe most widely-used of these environments.

• This also played a major role in making cluster computing a reality.

Page 35: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#35 Lec # 12 Fall 2003 11-3-2003

Heterogeneous Computing Limitations• Task Granularity

– Heterogeneous computing only utilizes coarse-grained parallelism to increaseperformance

– Coarse-grained parallelism results in large task sizes and reduced couplingwhich allows the processing elements to work more efficiently

– Requirement is also translated to most heterogeneous schedulers since they arebased on the scheduling of meta-tasks, i.e. tasks that have no dependencies

• Communication Overhead– Tasks and their working sets must be transmitted over some form of network in

order to execute them, latency and bandwidth become crucial factors– Overhead is also incurred when encoding and decoding the data for different

architectures

• Cost– Machines used in heterogeneous computing environments can be prohibitively

expensive– Expensive high speed, low latency networks are required to achieve the best

performance– Not cost effective for applications where only a small portion of the code would

benefit from such an environment

Page 36: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#36 Lec # 12 Fall 2003 11-3-2003

Micro-Heterogeneous Computing (MHC)

• The major limitation of computational-mode node homogeneity incomputer clusters has to be addressed to enable cluster computing toefficiently handle future supercomputing applications with diverse andincreasing computational demands.

• The utilization of faster microprocessors in cluster nodes cannotresolve this issue.– The development of faster GPPs only increases peak performance of cluster

nodes without introducing the needed heterogeneity of computing modes.

– This results in an even lower computational efficiency in terms ofachievable performance compared to potential peak performance of thecluster.

• Micro-Heterogeneous Computing (MHC) as a new computingparadigm proposed to address performance limitations resulting fromcomputational-mode homogeneity in computing nodes by extending thebenefits of heterogeneous computing to the single-node level.

HC-7: Bill Scheidel’s MS Thesis

Page 37: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#37 Lec # 12 Fall 2003 11-3-2003

• Micro-Heterogeneous Computing (MHC) is defined as the efficient anduser-code transparent utilization of heterogeneous modes of computationat the single-node level. The GPP-based nodes are augmented withadditional computing devices that offer different modes of computation.

• Devices that offer different modes of computation and thus can beutilized in MHC nodes include: Digital Signal Processors (DSPs),reconfigurable hardware such as Field Programmable Gate Arrays(FPGAs), vector co-processors and other future types of hardware-based devices that offer additional modes of computation.

• Such devices can be integrated into a base node creating an mHC node inthree different ways:

– Chip-level integration (on the same die as GPPs): Similar to System-On-Chip (SOC)approach of embedded systems.

– Integrated into the node at the system board-level. Or..

– As COTS PCI-based peripherals.

• In combination with base node GPPs, these elements create a small scaleheterogeneous computing environment.

Micro-Heterogeneous Computing (MHC)

Most cost-effective approach

HC-7: Bill Scheidel’s MS Thesis

Page 38: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#38 Lec # 12 Fall 2003 11-3-2003

An example PCI-basedMicro-Heterogeneous (MHC) Node

HC-7: Bill Scheidel’s MS Thesis

Page 39: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#39 Lec # 12 Fall 2003 11-3-2003

Comparison Between Heterogeneous Computingand Micro-Heterogeneous Computing

• Task Granularity– Heterogeneous environments only support coarse-grained parallelism,

while the MHC environment instead focuses on fine-grained parallelismby using a tightly coupled shared memory environment

– Task size is reduced to a single function call in a MHC environment– Drawbacks:

• Processing elements used in MHC are not nearly as powerful as the machinesused in a standard heterogeneous environment

• There is a small and finite number of processing elements that can be added to asingle machine

• Communication Overhead– High performance I/O buses are twice as fast as the fastest network– Less overhead is incurred when encoding and decoding data since all

processing elements use the same base architecture• Cost Effectiveness

– Machines used in a heterogeneous environment can cost tens ofthousands of dollars each, and require the extra expense of the high-speed, low latency interconnects to achieve acceptable performance

– MHC processing elements cost only hundreds of dollarsHC-7: Bill Scheidel’s MS Thesis

Page 40: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#40 Lec # 12 Fall 2003 11-3-2003

Possible COTS PCI-based MHC Devices

• A large number of COTS PCI-based devices are available thatincorporate processing elements with desirable modes of computation(e.g DSPs, FPGAs, vector processors).

• These devices are usually targeted for use in rapid system prototyping,product development, and real-time applications.

• While these devices are accessible to user programs, currently noindustry standard device-independent Application ProgrammingInterface (API) exists to allow device-independent user code access.

• Instead, multiple proprietary and device-specific APIs supplied by themanufacturers of the devices must used.– This makes working with one of these devices difficult and working with

combinations of devices quite a challenge.

HC-7: Bill Scheidel’s MS Thesis

Page 41: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#41 Lec # 12 Fall 2003 11-3-2003

Example Possible MHC PCI-based Devices• XP-15

– Developed by Texas MemorySystems

– DSP based accelerator card– 8 GFLOPS peak performance for

32-bit floating point operations.– Contains 256 MB of on board DDR

Ram– Supports over 500 different

scientific functions– Increases FFT performance by 20x

- 40x over a 1.4 Gigahertz Intel P4• Pegasus-2

– Developed by Catalina Research– Vector Processor based– Supports FFT, matrix and vector

operations, convolutions, filters andmore

– Supported functions operatebetween 5x and 15x faster then a 1.4Gigahertz Intel P4

HC-7: Bill Scheidel’s MS Thesis

Page 42: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#42 Lec # 12 Fall 2003 11-3-2003

COTS PCI-based MHC Devices• While a number of these COTS devices are good candidates for use in

cost-effective MHC nodes, two very important issues must be addressedto successfully utilize them in an MHC environment:

1 The use of proprietary APIs to access the devices is not user-codetransparent:

• Resulting code is tied to specific devices and is not portable to other nodesthat do not have the exact configuration.

• As a result, the utilization of these nodes in clusters is very difficult (MPIruns the same program on all cluster nodes), if not impossible.

• Thus a device-independent API must be developed and supported by theoperating system and target device drivers for efficient MHC nodeoperation to provide the required device abstraction layer.

2 In addition, the developer is left to deal with the difficult issues oftask mapping and load balancing, issues with which they may notbe intimately familiar.

• Thus operating system support for matching and scheduling (mapping)API calls to suitable devices must be provided for a successful MHCenvironment.

HC-7: Bill Scheidel’s MS Thesis

Page 43: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#43 Lec # 12 Fall 2003 11-3-2003

Scalable MHC Cluster Computing• To maintain cost-effectiveness and scalability of computer clusters while

alleviating node computational-mode homogeneity, clusters of MHC nodesare created by augmenting base cluster nodes with MHC PCI-based COTS.

CPU

HC-7: Bill Scheidel’s MS Thesis

Page 44: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#44 Lec # 12 Fall 2003 11-3-2003

Framework of MHC Architecture• A device-independent MHC-API in the form of dynamically-linked

libraries to allow user-code transparent access to these devices mustdefined and implemented.– MHC-API is used to make function calls that become tasks.

– MHC-API support should be added to the Linux kernel (de factostandard operating system for cluster computing).

– MHC-API calls are handled as operating system calls.

• An efficient matching and scheduling (mapping) mechanism to selectthe best suited device for a given MHC-API call and schedule it forexecution to minimize execution time must be developed.– The MHC-API call parameters are passed to the MHC mapping heuristic.

– A suitable MHC computing element is selected based on device availability,performance of the device for the MHC-API call and current workload.

– Once a suitable device is found for MHC-API call execution, the task isplaced in the queue of the appropriate device.

– Task execution on the selected device invokes the MHC-API driver for thatdevice.

Page 45: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#45 Lec # 12 Fall 2003 11-3-2003

Design Considerations of MHC-API• Scientific APIs take years to create and develop and more importantly, be

adopted for use.

• We therefore decided to create an extension on an existing scientific API andadd compatibility for MHC environment rather than developing a completelynew API.

• In addition, building off of an existing API means that there is already a userbase developing applications that would then become suitable for MHC withoutmodifying the application code.

• The GNU Scientific Library (GSL) was selected to form the basis of the MHC-API.

– GSL is an extensive, free scientific library that uses a clean andstraightforward API.

– It provides support for the Basic Linear Algebra Subprograms (BLAS)which is widely used in applications today.

– GSL is data-type compatible with the Vector, Signal, and Image ProcessingLibrary (VSIPL), which is becoming one of the standard libraries in theembedded world.

HC-7: Bill Scheidel’s MS Thesis

Page 46: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#46 Lec # 12 Fall 2003 11-3-2003

Micro-Heterogeneous Computing API

• Vector Operations• Matrix Operations• Polynomial Solvers• Permutations• Combinations• Sorting

• Linear Algebra• EigenVectors and EigenValues• Fast Fourier Transforms• Numerical Integration• Statistics

The M icro-H eterogeneous C omputing API (M H C -API)provides support for the following areas of scientificcomputing:

HC-7: Bill Scheidel’s MS Thesis

Page 47: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#47 Lec # 12 Fall 2003 11-3-2003

Analytical Benchmarking &Code-Type Profiling in MHC

• As in HC, analytical benchmarking is still needed in MHC todetermine the performance of each processing element for everyMHC-API call the device supports relative to the host processor.– This information must be known before program execution begins to

enable the scheduling algorithm to determine an efficient mapping oftasks.

– Since all of the processing elements have different capabilities, schedulingwould be impossible without knowing the specific capabilities of eachelement.

• While analytical benchmarking is still required, code-type profiling isnot needed in MHC.– Since Micro-Heterogeneous computers use a dynamic scheduler that

operates during run-time, there is no need to determine the types ofprocessing an application globally contains during compile time.

– This eliminates the need for special profiling tools and removes a step fromthe typical heterogeneous development cycle.

HC-7: Bill Scheidel’s MS Thesis

Page 48: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#48 Lec # 12 Fall 2003 11-3-2003

Formulation of Mapping Heuristics For MHC• Such heuristics for MHC environment are dynamic; the mapping is done during run-

time.

• The scheduler only has knowledge about those tasks that have already been scheduled.

• MHC environment consists of a set Q of q heterogeneous processing elements.• W is a computation cost matrix of size (v x q) that contains the estimated execution time

for all tasks already created where v is the number of the task currently beingscheduled.

• wi,j is estimated execution time of task i on processing element pj.• B is a communication cost matrix of size (q x 2), where bi,1 is the communication time

required to transfer this task to processing element pi and bi,2 is the per transactionoverhead for communicating with processing element pi. The estimated time tocompletion (ETC) of task i on processing element pj can be defined as:

• The estimated time to idle is the estimated amount of time before a processing element pjwill become idle. The estimated time to idle (ETI) of processor j is defined as:

2,1,,, jjjiji bbwETC ++=

∑≤≤

=nii

jij ETCETI ,

HC-7: Bill Scheidel’s MS Thesis

Page 49: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#49 Lec # 12 Fall 2003 11-3-2003

Initial Scheduling Heuristics Developed for MHC

• Three initial different schedulers are proposed for possibleadoption and implementation in the MHC environment:

• Fast Greedy• Real-Time Min-Min (RTmm)• Weighted Real-Time Min-Min

• All of these algorithms are based on static heterogeneousscheduling algorithms which have been modified to fit therequirements of MHC as needed.

• These initial algorithms were selected based on the results ofextensive static heterogeneous scheduling heuristics comparisonfound in published performance comparisons.

HC-7: Bill Scheidel’s MS Thesis

Page 50: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#50 Lec # 12 Fall 2003 11-3-2003

Fast Greedy Scheduling Heuristic• The heuristic simply searches for the processor with the lowest ETC for the task being

scheduled. Tasks that have previously been scheduled are not taken into account at all inthis algorithm.

• Fast Greedy first determines the subset of processors, S, of Q that support the current taskresulting from an MHC-API call being scheduled.

• The processor, sj, with the minimum ETC is chosen and compared against the ETC of thehost processor s0.

• If the speedup gained is greater then γγ then the task is scheduled to sj, otherwise the task isscheduled to the host processor.

HC-7: Bill Scheidel’s MS Thesis

Page 51: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#51 Lec # 12 Fall 2003 11-3-2003

Real-Time Min-Min (RTmm) Scheduling Heuristic• The RTmm first determines the subset of processing elements, S, of Q that support the

current task being scheduled.

• The ETC for the task and the ETI for each of the processing elements in S is then calculated.

• The ETCi,j(total) for task i on processing element pj is equal to the sum of ETCij and ETIj. Theprocessing element, sj, with the minimum newly calculated ETCtotal is chosen and comparedagainst the ETCtotal of the host processor, s0.

• If the speedup gained is greater then γγ then the task is scheduled to sj, otherwise the task isscheduled to host processor, s0.

HC-7: Bill Scheidel’s MS Thesis

Page 52: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#52 Lec # 12 Fall 2003 11-3-2003

Weighted Real-Time Min-Min (WRTmm)• WRTmm uses the same algorithm as RTmm but adds two additional parameters so that the scheduling

can be fine tuned to specific applications. First, the parameter αα takes into account the case when a taskdependency exists for the task currently being scheduled. A value of α α less then one tends to schedulethese tasks onto the same processing element as the dependency, while a value greater then one tends toschedule these tasks onto a different processing element.

• Second, the parameter ρρ is used to schedule tasks to elements that support fewer MHC-API calls andmust be between 0 and 1. A low value of ρρ informs the scheduler not to include the number of MHC-API calls supported by devices as factor in the mapping decision, while the opposite is true for highvalues of ρρ.

HC-7: Bill Scheidel’s MS Thesis

Page 53: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#53 Lec # 12 Fall 2003 11-3-2003

Modeling & Simulation of MHC Framework• The aid in the process of evaluating design considerations of the proposed MHC

architecture framework, flexible modeling and simulation tools have been developed.

• These tools allow running actual applications that utilize an initial subset of MHC-API ona simulated MHC node.

• The modeled MHC framework includes the user-code transparent mapping of MHC-APIcalls to MHC devices.

• Most MHC framework parameters are configurable to allow a wide range of design issues tobe studied. The capabilities and characteristics of the developed MHC framework modelingtools are summarized as follows:

– Dynamically linked library written in C and compiled for Linux kernel 2.4 that supports an initial subset of60 MHC-API calls allows actual compiled C programs to utilize MHC-API calls and run on the modeledMHC framework.

– Flexible configuration of the number and characteristics of the devices in the MHC environment, includingthe MHC-API calls supported by each device and device performance for each call supported.

– Modeling of task device queues for MHC devices in the framework.

– Flexible configuration of the buses used by MHC devices including the number of buses available and busperformance parameters including transaction overheads and per byte transfer time.

– Flexibility in supporting a wide range of dynamic task/device matching and scheduling heuristics.

– Simulated MHC device drivers that actually perform the computation required by the MHC-API call.

– Modeling of MHC operating system call handlers that allow task creation as a result of MHC-API calls, taskscheduling using dynamic heuristics, and task execution on the devices using the simulated device drivers.

– Extensive logging of performance data to evaluate different configurations and scheduling heuristics.

– A graphical user interface implemented in Qt to allow setting up and running simulations. It alsoautomatically analyzes the log files generated by the modeled MHC framework and generates in-depthHTML reports.

Page 54: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#54 Lec # 12 Fall 2003 11-3-2003

Structure of the Modeled MHC Framework

HC-7: Bill Scheidel’s MS Thesis

Page 55: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#55 Lec # 12 Fall 2003 11-3-2003

Phases of the Micro-Heterogeneous ComputingFramework Modeling

• Initialization:

– The framework must be initialized before it may be used– Scheduler and scheduler parameters chosen– Bus and Device Configuration Files read– Log file specified

– Data structures created– Helper threads are created that move tasks from a device’s

task queue to the device. These threads are real-time threadsthat use a round-robin scheduling policy.

Page 56: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#56 Lec # 12 Fall 2003 11-3-2003

Micro-Heterogeneous Computing Framework Modeling

Device Configuration File• Determines what devices are available in the Micro-Heterogeneous

environment• File is XML based which makes it easy for other programs to generate

and parse device configuration files• The following is configurable for each device:

– Unique ID– Name– Description– Bus that the device uses– A list of API calls that the device supports, each API call in the list

contains:• The ID and Name of the API call• The speedup achieved as compared to the host processor• The expected time to completion (ETC) of the API call given in

microseconds per byte of input

Page 57: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#57 Lec # 12 Fall 2003 11-3-2003

Micro-Heterogeneous Computing Framework Modeling

Example Device Configuration File<mHCDeviceConfig> <Device> <ID>0</ID> <Name>Host</Name> <Description>A bad host.</Description> <BusName>Local</BusName> <BusID>0</BusID> <APISupport> <Function> <ID>26</ID> <Name>mhc_combination_next</Name> <Speedup>1</Speedup> <CompletionTime>.015</CompletionTime> </Function> <Function> <ID>9</ID> <Name>mhc_vector_sub</Name> <Speedup>1</Speedup> <CompletionTime>.001</CompletionTime> </Function> </APISupport> </Device>

<Device> <ID>1</ID> <Name>Vector1</Name> <Description>A simple vector processor.</Description> <BusName>PCI</BusName> <BusID>1</BusID> <APISupport> <Function> <ID>9</ID> <Name>mhc_vector_sub</Name> <Speedup>10</Speedup> <CompletionTime>.0001</CompletionTime> </Function> </APISupport> </Device> </mHCDeviceConfig>

HC-7: Bill Scheidel’s MS Thesis

Page 58: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#58 Lec # 12 Fall 2003 11-3-2003

Micro-Heterogeneous Computing Framework Modeling

Bus Configuration File• Determines the bus characteristics being used by the devices• File is XML based which makes it easy for other programs to generate and

parse bus configuration files• The following is configurable for each bus:

– Unique ID– Name– Description– Initialization time

• Specified in microseconds• Taken into account once during the framework initialization

– Overhead Time• Specified in microseconds• Taken into account once for ever bus transaction

– Transfer Time• Specified in microseconds per byte• Taken into account once for every byte that is transmitted over the bus

Page 59: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#59 Lec # 12 Fall 2003 11-3-2003

Micro-Heterogeneous Computing Framework Modeling

Example Bus Configuration File

<mHCBusConfig> <Bus> <ID>0</ID> <Name>Local</Name> <Description>Used by the host</Description> <InitTime>0</InitTime> <Overhead>0</Overhead> <TransferTime>0</TransferTime> </Bus> <Bus> <ID>1</ID> <Name>PCI</Name> <Description>PCI bus</Description> <InitTime>50</InitTime> <Overhead>0.01</Overhead> <TransferTime>0.002</TransferTime> </Bus></mHCBusConfig>

HC-7: Bill Scheidel’s MS Thesis

Page 60: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#60 Lec # 12 Fall 2003 11-3-2003

Micro-Heterogeneous Computing Framework Modeling

Phases of the MHC Framework

• Task Creation

– A new task is created for every API call that ismade, except for initialization, finalization, andjoin calls

– Tasks encapsulate all of the information of afunction call

• ID of function to execute• List of pointers to all of the arguments• List of pointers to all of the data blocks used as inputs and their

sizes• List of pointers to all of the data blocks used as outputs and

their sizes

Page 61: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#61 Lec # 12 Fall 2003 11-3-2003

Micro-Heterogeneous Computing Framework Modeling

Phases of the MHC Framework

• Task Scheduling

– After a task is created, it is passed to the schedulingalgorithm that was selected during initialization

– The scheduler determines which device to assignthe task and places the task in that device’s taskqueue

• Done dynamically in real-time• Profiling of applications is not required

– As soon as the scheduler has mapped the task to adevice the API call returns and the main userprogram is allowed to continue execution

Page 62: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#62 Lec # 12 Fall 2003 11-3-2003

• Task Execution

– If a task is available,• The helper thread checks to see if there are any unresolved

dependencies• If there are no dependencies, the task is removed from the task

queue and passed to the device driver for execution, otherwise itsleeps

– All tasks are executed on the host processor bysimulated drivers

Micro-Heterogeneous Computing Framework Modeling

Phases of the MHC Framework

Page 63: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#63 Lec # 12 Fall 2003 11-3-2003

Preliminary Simulation Results• The MHC framework modeling and simulation tools were utilized to run actual

applications using the modeled MHC environment to demonstrate the effectiveness ofMHC. The tools were also used to evaluate the performance of the initial proposedscheduling heuristics, namely Fast Greedy, RTmm, WRTmm . Some of the applicationswritten using MHC-API and selected for the initial simulations include:

– A matrix application that performs some basic matrix operations on a set of fifty 100x 100 matrices.

– A linear equations solver application that solves fifty sets of linear equations eachcontaining one hundred and seventy-five variables.

– A random task graphs application that creates random task graphs consisting of 300fine-grain tasks with varying depth and dependencies between them. This applicationwas used to stress test the initial scheduling heuristics proposed and examine theirfine-grain load-balancing capabilities

• Different MHC device configurations were used including:

– Uniform Speedup: A variable number of PCI-based MHC devices ranging from 0 to6 each with 20x speedup

– Different Speedup: A variable number of MHC devices from 0 to 6 with speedups of20, 10, 5, 2, 1, and 0.5

Page 64: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#64 Lec # 12 Fall 2003 11-3-2003

5.16.643.72.82WRTmm

53.753.72.421.4RTmm

2.32.32.32.32.32.3 FastGreedy

765432

Speedup Over HostProcessor

Matrix Application Simulation Performance Results (uniform device speedup =20)

Page 65: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#65 Lec # 12 Fall 2003 11-3-2003

Linear Equations Solver Simulation Performance Results (uniform device speedup =20)

• The simulation results indicate that Fast Greedy performs well for small number ofdevices (2-3), while WRTmm provides consistently better performance than the otherheuristics examined.

• Similar conclusions were reached for the matrix application and devices with differentspeedups.

• This indicates that Fast Greedy is a possible choice when the number of MHC devices issmall but WRTmm is superior when the number of devices is increased.

8.26.46.04.43.41.6WRTmm

6.43.74.32.23.41.4RTmm

2.93.03.13.13.03.2 FastGreedy

765432

Speedup Over HostProcessor

Page 66: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#66 Lec # 12 Fall 2003 11-3-2003

Random Task Graphs For Devices with Varying DeviceSpeedups

• Test run to study the capability of the heuristics at load-balancing many fine-grain tasks.

• The results show that only WRTmm reduced the overall execution time asmore devices were added.

• The results also show that WRTmm is able to take advantage of slower devicesin the computation.

Page 67: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#67 Lec # 12 Fall 2003 11-3-2003

Random Task Graphs Performance For Four Devices with Varying DeviceSpeedups

• This simulation was used to test the performance of the heuristics with slower devices.• Both Fast Greedy and RTmm proved to be very dependent on the speedup of the devices in order

to achieve good performance.• WRTmm did not demonstrate this dependence at all and execution time changed very little as the

device speedup was reduced.• This is close to the ideal case since the task graphs were not composed of computationally intensive

tasks whose execution time could be improved by any dramatic amount by increasing the devicespeedup alone.

• The poor load-balancing capabilities of Fast Greedy and RTmm actually are partially hidden asdevice speedups are increased.

Page 68: Heterogeneous Computing (HC) & Micro-Heterogeneous ...meseec.ce.rit.edu/eecc722-fall2003/722-11-3-2003.pdf · EECC722 - Shaaban #2 Lec # 12 Fall 2003 11-3-2003 High Performance Computing

EECC722 - ShaabanEECC722 - Shaaban#68 Lec # 12 Fall 2003 11-3-2003

Future MHC Work• MHC scheduling heuristics: Refinement of mapping heuristics for MHC.• MHC-API: While MHC-API currently contains the most common scientific functions, it

needs to be expanded in order to fully compliant with GSL.• Linux Kernel MHC-API Support: Adding support for the MHC environment

framework. This includes adding support for MHC task creation, scheduling andexecution.

• MHC-compliant Device Drivers: Two COTS PCI-based devices have beenidentified as example MHC compute elements that offer different modes of computationand will be targeted:

• DSP-Based Device: Sheldon Instruments SI-C6711DSP-PCI.

• FPGA-Based Device: Annapolis Micro Systems FIREBIRDTM for PCI

• MHC node Performance Studies: A number of applications that range from syntheticbenchmarks to image understanding scene classification problem to identify anyperformance bottlenecks in the actual MHC node including, fine-tuning schedulingheuristics implementation inefficiencies, or driver issues.

• Scalable MHC cluster Performance: MHC nodes will be added to an existing cluster.Message passing support will be added using MPI to the MHC-API enabled imageunderstanding scene classification applications developed to exploit both coarse-grainedand fine-grained parallelism. The resulting applications performance evaluations shouldprove valuable in demonstrating the feasibility of such clusters and help identifyperformance-related issues.