Presentation is loading. Please wait.

Presentation is loading. Please wait.

Presented by Jeremy S. Meredith Sadaf R. Alam Jeffrey S. Vetter Future Technologies Group Computer Science and Mathematics Division Research supported.

Similar presentations


Presentation on theme: "Presented by Jeremy S. Meredith Sadaf R. Alam Jeffrey S. Vetter Future Technologies Group Computer Science and Mathematics Division Research supported."— Presentation transcript:

1 Presented by Jeremy S. Meredith Sadaf R. Alam Jeffrey S. Vetter Future Technologies Group Computer Science and Mathematics Division Research supported by the Department of Energy’s Office of Science Office of Advanced Scientific Computing Research Programming the Cell Processor: Achieving High Performance and Efficiency

2 2 Meredith_Cell_SC07  One POWER architecture processing element (PPE)  Eight synergistic processing elements (SPEs)  All connected through a high-bandwidth element interconnect bus (EIB)  Over 200 gigaflops (single precision) on one chip Cell broadband engine processor: An overview

3 3 Meredith_Cell_SC07 Cell broadband engine processor: Details Eight SPEs  Dual-threaded  Vector instructions  Dual-issue pipeline  Simple instruction set heavily focused on single instruction multiple data (SIMD)  Capability for double precision, but optimization for single  Uniform 128-bit 128-register file  256-K fixed-latency local store  Memory flow controller with direct memory access (DMA) engine to access main memory or other SPE local stores One 64-bit PPE

4 4 Meredith_Cell_SC07 Genetic algorithm, traveling salesman: Single- vs. double-precision performance  The cell processor has a much higher latency for double-precision results.  The “ if ” test in the sorting predicate is highly penalized for double precision.

5 5 Meredith_Cell_SC07 Genetic algorithm, Ackley’s function: Using SPE-optimized math libraries Ackley’s function involves cos, exp, sqrt 0.047 0.681 0.248 0.064 0.01 0.1 1 OriginalFast cosine Fast exp/sqrt SIMD Runtime (sec) [log scale] Switching to a math library optimized for SPEs results in a more than 10x improvement for single precision

6 6 Meredith_Cell_SC07  The cell processor can overlap communication with computation.  Covariance matrix creation has a low ratio of communication to computation.  However, even with an SIMD-optimized implementation, the high bandwidth of the cell’s EIB makes this overhead negligible. 0 5 10 15 20 25 30 35 ScalarSIMD Optimizations Runtime using 1 SPE (sec) Synchronous DMA Overlapped DMA 6 Meredith_Cell_CS07 Covariance matrix creation: DMA communication overhead

7 7 Meredith_Cell_SC07 Stochastic Boolean SAT solver: Hiding latency in logic-intensive apps PPE: attempting to hide latency manually works against the compiler SPE: manual loop unrolling and instruction reordering achieved speedups although no computational SIMD optimizations were possible

8 8 Meredith_Cell_SC07 Support vector machine: Parallelism and concurrent bandwidth  As more simultaneous SPE threads are added, the total runtime decreases.  Total DMA time also decreases, showing that the concurrent bandwidth to all SPEs is higher than to any one SPE.  Thread launch time increases, but the latest Linux kernel for the cell system does reduce this overhead. Full execution Launch + DMA Thread launch 8 Meredith_Cell_SC07

9 9 Meredith_Cell_SC07 Threads launched only on first call Molecular dynamics: SIMD intrinsics and PPE-to-SPE signaling  Using SIMD intrinsics easily achieved 2x speedups in total runtime.  Using PPE-SPE mailboxes, SPE threads can be reused across iterations.  Thus, thread launch overheads will be completely amortized on longer runs. 0.0 0.5 1.0 1.5 2.0 2.5 1 SPE, original 1 SPE, SIMDized 1 SPE2 SPEs4 SPEs8 SPEs Runtime (sec) Full runtime Thread launch overhead

10 10 Meredith_Cell_SC07 Conclusion  Be aware of arithmetic costs.  Use the optimized math libraries from the SDK if it helps.  Double precision requires different kinds of optimizations.  The cell has a very high bandwidth to the SPEs.  Use asynchronous DMA to overlap communication and computation for applications that are still bandwidth bound.  Amortize expensive SPE thread launch overheads.  Launch once, and signal SPEs to start the next iteration.  Use of SIMD intrinsics can result in large speedups.  Manual loop unrolling and instruction reordering can help even if no other SIMDization is possible.

11 11 Meredith_Cell_SC07 Contact Jeremy Meredith Future Technologies Group Computer Science and Mathematics Division (865) 241-5842 jsmeredith@ornl.gov 11 Meredith_Cell_SC07


Download ppt "Presented by Jeremy S. Meredith Sadaf R. Alam Jeffrey S. Vetter Future Technologies Group Computer Science and Mathematics Division Research supported."

Similar presentations


Ads by Google