Chapter 4a: Brandon Chisholm, Chris Barile: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Added "profile-driven")
No edit summary
Line 3: Line 3:
== Techniques ==
== Techniques ==
===Profile-Driven Parallelism===
===Profile-Driven Parallelism===
This technique involves running the program while closely looking at each memory access. The memory accesses are then looked at to determine what code can be parallelized. This technique is simple, but does not cover all the possible input combinations. These may lead to false positives in which code segments can be labelled as parallelizeable when they actually aren't.
This technique involves running the program while recording each memory access in detail. The memory accesses are then looked at to determine what code can be parallelized. This technique is simple, but does not cover all the possible input combinations. These may lead to false positives in which code segments can be labelled as parallelizeable when they actually aren't.
===Polyhedral Transformation===
===Polyhedral Transformation===
Polyhedral transformation involves representing loop iterations from the source code as lattice points in something called a polytope. This polytope is then transformed into a more optimized form. This approach is limited when pointers are found inside loops.
[[File:polytope_model.png|thumb|right|200px|Polytope model, unskewed]]
[[File:polytope_model.png|thumb|right|200px|Polytope model, unskewed]]
[[File:polytope_model_skewed.png|thumb|right|200px|Polytope model, skewed]]
[[File:polytope_model_skewed.png|thumb|right|200px|Polytope model, skewed]]

Revision as of 13:18, 21 March 2012

Automatic Parallelism is the process of automatically converting sequential code into code that will make use of multiple processors. One main reason for implementing automatic parallelism is to save time and energy compared to converting the code manually.<ref name="wiki" /> There are several techniques that have been created for parallelizing code, but each has limitations.

Techniques

Profile-Driven Parallelism

This technique involves running the program while recording each memory access in detail. The memory accesses are then looked at to determine what code can be parallelized. This technique is simple, but does not cover all the possible input combinations. These may lead to false positives in which code segments can be labelled as parallelizeable when they actually aren't.

Polyhedral Transformation

Polyhedral transformation involves representing loop iterations from the source code as lattice points in something called a polytope. This polytope is then transformed into a more optimized form. This approach is limited when pointers are found inside loops.

Polytope model, unskewed
Polytope model, skewed

Automatic Program Exploration

Scalar and Array Analysis

Commutativity Analysis

Low Level Virtual Machine

Limitations

One of the major limitations of automatic parallelization is that a computer lacks the insight into the overall intention of a program that a human would have. The programmer understands what the program must do, and can use that to determine if there are alternate approaches or algorithms for parallelizing the code. Even when parallelizing manually, a programmer may not have enough insight into parallel programming, and will need the assistance of an expert to improve code performance.<ref name="ncsa" />

References

<references> <ref name="chia">http://www.eecs.berkeley.edu/%7Echiayuan/cs262a/cs262a_parallel.pdf</ref> <ref name="dipa">http://www.csc.villanova.edu/%7Etway/publications/DiPasquale_Masplas05_Paper5.pdf</ref> <ref name="wiki">http://en.wikipedia.org/wiki/Automatic_parallelization</ref> <ref name="ncsa">http://www.ncsa.illinois.edu/extremeideas/site/on_the_limits_of_automatic_parallelization</ref> </references>