energy auto tuning using the polyhedral approach
play

Energy Auto-Tuning using the Polyhedral Approach Wei Wang 1 John - PowerPoint PPT Presentation

Energy Auto-Tuning using the Polyhedral Approach Wei Wang 1 John Cavazos 1 Allan Porterfield 2 1 Dept. of Computer & Information Sciences University of Delaware 2 RENaissance Computing Institute (RENCI) University of North Carolina-Chapel Hill


  1. Energy Auto-Tuning using the Polyhedral Approach Wei Wang 1 John Cavazos 1 Allan Porterfield 2 1 Dept. of Computer & Information Sciences University of Delaware 2 RENaissance Computing Institute (RENCI) University of North Carolina-Chapel Hill January 20, 2014 IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  2. Introduction Application Energy Consumption Optimizing for lower energy has become critical when we approach Exascale Computing. Tuning for faster execution vs. tuning for lower Energy? Knowledge of the relationship between the two will guide auto-tuning process. Energy Impact of Polyhedral Optimizations Not well understood. Polyhedral optimizations barely studied on non-trivial/realistic applications. IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  3. Auto-tuning Framework Program Characterization Control Flow Graph(CFG) Source Code, Performance Counters, ... Optimization Sequences Src-to-Src Compiler Energy Profiling Energy Related Counters Machine Learning Algorithms Auto-tuning for time is very effective, SVM especially using CFG as program feature. Linear Regression,... (Refs: Park et al. CGO’11, CGO’12, IJPP’13) IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  4. Energy Measurement using RCRTool MSRs/Energy File: Instantaneous Energy RCRTool Energy Blackboard: Accumulated Energy RCRTool API calls: Records energy consumption of executed application codes IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  5. Energy Measurement using RCRTool Architecture Tested Sandy Bridge, Ivy Bridge Shared memory stores MSR counters. Update frequency: > 1000/s. Supported Language: OpenMP , MPI. MIC Shared memory stores energy obtained from PAPI and Intel MICAccessSDK. Update frequency: about 20/s. Host version and MIC-native version. Supported Language: OpenMP (offload and native), OpenCL (host). IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  6. RCRTool Exposed APIs energyDaemonInit() energyDaemonEnter(): Start/Resume measurement when entering a region. energyDaemonExit(file, line_no): Stop/Pause measurement upon exiting the region energyDaemonTerm() energyDaemonTEStart(): Start measuring Time and Energy energyDaemonTEStop(): Stop measuring Time and Energy IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  7. Exposed APIs-Example Original OpenMP program Added with energy profiling call IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  8. Polyhedral Compilers Generate code variants of a program containing Static Control Parts (SCoP) using PoCC (Polyhedral Compiler Collection). Loop Transformations Auto Parallelization (PLUTO) Tested Applications Existing: Polybench New: 2D Cardiac Wave Propagation Simulation, LULESH (C/C++) IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  9. Energy Profiling of Different Program Optimizations Workflow of energy-aware polyhedral framework IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  10. Experiments Setup Hardware Intel Xeon E5-2680 (dual socket 8-core processor with 20MB cache) Xeon Phi coprocessor (61 cores, 1.09GHz, 512KB cache each) Software Polyhedral Compilers: PoCC v1.2 and Polyopt v0.2.1 Application: Polybench v3.2 and LULESH v1.0 (OpenMP) Back-end Compilers: GCC v4.4.6 and ICC v14.0.0 IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  11. Energy Consumption and Execution Time Correlation (Polybench) Covariance Polybench 2mm Polybench 2400 20 8000 55 Time Time Execution Time (seconds) Execution Time (seconds) 2200 18 50 Energy 7000 Energy 2000 16 45 Energy (joules) Energy (joules) 6000 1800 14 40 1600 5000 12 35 1400 10 30 4000 1200 8 25 1000 3000 6 20 800 2000 4 15 600 400 2 1000 10 0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000 Program Variants Program Variants Loop fusion (maxfuse) reduce execution time but increases energy consumption (spikes and the tail in Covariance benchmark). Bad tiling configuration increases energy consumption (spikes in 2mm benchmark). Best optimizations for time are best for energy savings for these two polybench application. IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  12. Energy Consumption and Execution Time Correlation (Polybench Stencil Seidel2D Program) 2200 35 Time 2000 Execution Time (seconds) Energy 30 1800 Energy (joules) 1600 25 1400 20 1200 1000 15 800 10 600 400 5 200 0 0 0 1000 2000 3000 4000 5000 Program Variants For the stencil program, the correlation between the execution time and the energy consumption is also observed. Jumps in energy usage (and decreased execution time) are results of turning parallelization on. IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  13. Energy Consumption and Execution Time Correlation (LULESH) 3800 24 Time Execution Time (seconds) 3600 Energy 22 3400 Energy (joules) 3200 20 3000 18 2800 2600 16 2400 14 2200 2000 12 0 20 40 60 80 100 120 140 160 180 200 Program Variants As a larger application, LULESH also displays the similar correlation between energy and time. The best optimized program for time is also for energy. (Note: the graph is from optimizing one loop nest). IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  14. Effectiveness of Polyhedral Optimizations on a Realistic Application 2D Cardiac Wave Propagation Speedup obtained on a Sandy Bridge system. Simulation 1.25 0.25 Time Normalized Energy Savings Energy 1.2 0.2 Speedups 1.15 0.15 1.1 0.1 1.05 0.05 1 0 256 512 1024 2048 Problem Size IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  15. Results on MIC for Cardiac Simulation 160 160 1.25 0.25 Manual Speedups Normalized Energy Savings Polyopt EnergySavings 140 140 1.2 0.2 120 120 Speedups Speedups 1.15 0.15 100 100 1.1 0.1 80 80 1.05 0.05 60 60 40 40 1 0 256 512 1024 2048 256 512 1024 2048 Problem Size Problem Size Left: The best optimized PolyOpt program variant vs manual OpenMP (over sequential baseline). Right: Speedups and energy savings comparing the manual OpenMP with the best PolyOpt program variant. Conclusion: Polyhedral Approach is effective in optimizing the 2D Cardiac Wave Propagation Simulation. IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  16. Energy Consumption and Execution Time Correlation (2D Cardiac Wave Propagation Simulation) 10500 75 9000 55 Time Time Execution Time (seconds) Execution Time (seconds) 50 10000 Energy 8000 Energy 70 45 9500 7000 Energy (joules) Energy (joules) 65 40 9000 6000 35 60 8500 5000 30 8000 55 25 4000 7500 20 50 3000 7000 15 45 2000 6500 10 6000 40 1000 5 0 10 20 30 40 50 60 70 80 90 0 10 20 30 40 50 60 70 80 90 Program Variants Program Variants Left: Time and energy correlation on Sandy Bridge Right: Time and energy correlation on MIC Conclusion: Energy tracks the time. Saving energy consumption is consistent with improving performance on both processors IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  17. Challenges/Limitations using Polyhedral Compilers Exposing SCoPs of the application LULESH contains six large regions that are potential SCoPs. Temporary (array/scalar) variables Large number of dependences between statements in a SCoP . In LULESH, a human-readable SCoP can easily contain thousands of dependences. Temporary variables elimination Resulting code is not human-readable and may reduce optimization effectiveness. IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  18. Polyhedral Transformable LULESH Code :( That is part of ONE statement! IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  19. Conclusion Tuning for time can be used as proxy to tuning for energy Energy/time correlation observed for many benchmarks. Optimizations can increase the power and energy, but variant with minimum execution time also has the lowest energy usage. Effectiveness On different architectures, improvements as high as 20% in execution time and a similar amount of reduction in energy (for a realistic application) are obtained using polyhedral approach. IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

  20. Acknowledgment EunJung Park, University of Delaware Matthew Kay, The George Washington University Louis-Noël Pouchet, UCLA Albert Cohen, INRIA Riyadh Baghdadi, INRIA Sven Verdoolaege, ENS IMPACT 2014 Workshop, Jan 20, 2014, Vienna, Austria Energy Auto-Tuning using the Polyhedral Approach

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend