Vectorization Workflow Diagram
- Surveyanalysis -Offers integrated compiler report data and performance data all in one place. Use it to help identify:
TheSurvey Analysisalso provides code-specific recommendations for how to fix vectorization issues, and quick visibility into source code and assembly code.
- Where vectorization, or parallelization with threads, will pay off the most
- If vectorized loops are providing benefit, and if not, why not
- Un-vectorized loops and why they are not vectorized
- Performance problems in general
- Dynamically identifies the number of times loops are invoked and execute (sometimes calledcall count/loop countanditeration countrespectively); and measures the number of floating-point and integer operations, and memory traffic. Use to make better decisions about your vectorization strategy for particular loops, as well as optimize already-parallel loops.
- Rooflineanalysis (optional) - Helpsvisualize actual performance against hardware-imposed performance ceilings, as well as determine the main limiting factor (memory bandwidth or compute capacity), thereby providing an ideal roadmap of potential optimization steps.Use theRooflinechart to answer the following questions:
- What is the maximum achievable performance with your current hardware resources?
- Does your application work optimally on current hardware resources?
- If not, what are the best candidates for optimization?
- Is memory bandwidth or compute capacity limiting performance for each optimization candidate?
- Dependenciesanalysis (optional) -For safety purposes, the compiler is often conservative when assuming data dependencies. Use a Dependencies-focusedRefinement Reportto check for real data dependencies in loops the compiler did not vectorize because of assumed dependencies. If real dependencies are detected, the analysis can provide additional details to help resolve the dependencies. Your objective: Identify and better characterize real data dependencies that could make forced vectorization unsafe.
- Memory Access Patterns (MAP)analysis (optional) -Use a MAP-focusedRefinement Reportto check for various memory issues, such as non-contiguous memory accesses and unit stride vs. non-unit stride accesses. Your objective: Eliminate issues that could lead to significant vector code execution slowdown or block automatic vectorization by the compiler.