DOC PREVIEW
MIT 6 189 - StreamIt Parallelizing Compiler

This preview shows page 1-2-3-20-21-22-41-42-43 out of 43 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Prof. Saman Amarasinghe, MIT. 1 6.189 IAP 2007 MIT6.189 IAP 2007Lecture 12StreamIt Parallelizing Compiler2 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.Common Machine Language● Represent common properties of architectures Necessary for performance● Abstract away differences in architectures Necessary for portability● Cannot be too complex Must keep in mind the typical programmer● C and Fortran were the common machine languages for uniprocessors Imperative languages are not the correct abstraction for parallel architectures.● What is the correct abstraction for parallel multicore machines?3 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.Common Machine Language for Multicores● Current offerings: OpenMP MPI High Performance Fortran ● Explicit parallel constructs grafted onto imperative language● Language features obscured: Composability Malleability  Debugging● Huge additional burden on programmer: Introducing parallelism Correctness of parallelism Optimizing parallelism4 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.Explicit Parallelism● Programmer controls details of parallelism!● Granularity decisions: if too small, lots of synchronization and thread creation  if too large, bad locality● Load balancing decisions Create balanced parallel sections (not data-parallel)● Locality decisions Sharing and communication structure● Synchronization decisions barriers, atomicity, critical sections, order, flushing● For mass adoption, we need a better paradigm: Where the parallelism is natural Exposes the necessary information to the compiler5 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.Unburden the Programmer● Move these decisions to compiler! Granularity Load Balancing Locality Synchronization● Hard to do in traditional languages Can a novel language help?6 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.● Regular and repeating computation● Synchronous Data Flow● Independent actors with explicit communication● Data items have short lifetimesBenefits:● Naturally parallel● Expose dependencies to compiler● Enable powerful transformationsAdderSpeakerAtoDFMDemodLPF1DuplicateRoundRobinLPF2LPF3HPF1HPF2HPF3Properties of Stream Programs7 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.Outline● Why we need New Languages?● Static Schedule ● Three Types of Parallelism● Exploiting Parallelism8 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.…push=2Steady-State Schedule● All data pop/push rates are constant● Can find a Steady-State Schedule # of items in the buffers are the same before and the after executing the schedule There exist a unique minimum steady state schedule● Schedule = { }pop=3push=1pop=2…ABC9 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.…push=2…push=2Steady-State Schedule● All data pop/push rates are constant● Can find a Steady-State Schedule # of items in the buffers are the same before and the after executing the schedule There exist a unique minimum steady state schedule● Schedule = { A }pop=3push=1pop=2…ABC10 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.…push=2…push=2Steady-State Schedule● All data pop/push rates are constant● Can find a Steady-State Schedule # of items in the buffers are the same before and the after executing the schedule There exist a unique minimum steady state schedule● Schedule = { A, A }pop=3push=1pop=2…ABC11 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.…push=2Steady-State Schedule● All data pop/push rates are constant● Can find a Steady-State Schedule # of items in the buffers are the same before and the after executing the schedule There exist a unique minimum steady state schedule● Schedule = { A, A, B }pop=3push=1pop=2…pop=3push=1ABC12 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.…push=2…push=2Steady-State Schedule● All data pop/push rates are constant● Can find a Steady-State Schedule # of items in the buffers are the same before and the after executing the schedule There exist a unique minimum steady state schedule● Schedule = { A, A, B, A }pop=3push=1pop=2…ABC13 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.…push=2Steady-State Schedulepop=3push=1pop=2…pop=3push=1ABC● All data pop/push rates are constant● Can find a Steady-State Schedule # of items in the buffers are the same before and the after executing the schedule There exist a unique minimum steady state schedule● Schedule = { A, A, B, A, B }14 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.…push=2Steady-State Schedule● All data pop/push rates are constant● Can find a Steady-State Schedule # of items in the buffers are the same before and the after executing the schedule There exist a unique minimum steady state schedule● Schedule = { A, A, B, A, B, C }pop=3push=1pop=2…pop=2…ABC15 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.Initialization Schedule● When peek > pop, buffer cannot be empty after firing a filter ● Buffers are not empty at the beginning/end of the steady state schedule● Need to fill the buffers before starting the steady state execution peek=4pop=3push=116 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.Initialization Schedule● When peek > pop, buffer cannot be empty after firing a filter ● Buffers are not empty at the beginning/end of the steady state schedule● Need to fill the buffers before starting the steady state execution peek=4pop=3push=1peek=4pop=3push=117 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.Outline● Why we need New Languages?● Static Schedule ● Three Types of Parallelism● Exploiting Parallelism18 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.Types of ParallelismTask Parallelism Parallelism explicit in algorithm Between filters without producer/consumer relationshipData Parallelism Peel iterations of filter, place within scatter/gather pair (fission) parallelize filters with statePipeline Parallelism Between producers and consumers Stateful filters can be parallelizedScatterGatherTask19 6.189 IAP 2007 MITProf. Saman Amarasinghe, MIT.Types of ParallelismTask Parallelism Parallelism explicit in algorithm Between filters without producer/consumer relationshipData Parallelism Between iterations of a stateless filter  Place within scatter/gather pair (fission) Can’t parallelize filters with statePipeline Parallelism Between producers and consumers


View Full Document

MIT 6 189 - StreamIt Parallelizing Compiler

Download StreamIt Parallelizing Compiler
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view StreamIt Parallelizing Compiler and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view StreamIt Parallelizing Compiler 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?