DPC-Lab2-Parallelism in Intel's Modern Architecture
DPC-Lab2-Parallelism in Intel's Modern Architecture
Part 1: Vectorization
1. For this lab exercise, we will go through several code optimization by taking
advantage of modern processors SIMD instructions—vectorization.
2. We will use the Coursera’s online course on “Fundamentals of Parallelism on
Intel Architecture”, available at https://www.coursera.org/learn/parallelism-ia
3. This lab exercise is based on the Week 2 materials on “Fundamentals of
Parallelism on Intel Architecture”.
4. Follow the instruction in the ULearn page to download and setup the Ubuntu
Virtual Machine (UVM) on your personal computer. The UVM has been setup
with the necessary tools and libraries required for the lab exercises.
4. Remember to use the intel compilers and the -qopt-report options to verify
vectorization or the cause of non-vectorization. In your report, you should include
the following:
1
EDB4603 (DPC) Jan’22 – Lab 1
2. Review this video to understand what the numerical integration code does.
https://www.coursera.org/learn/parallelism-ia/lecture/o94Je/numerical-integration-
introduction
3. Using demonstration video “2.9 Integral Vectorization” as reference, vectorize
the numerical integration code by considering the following optimization options.
a. Make the function that is being called by the ComputeIntegral function in
worker.cc, vectorizable.
b. Subsequent to part (a), the main “for loop” in worker.cc is assumed to have
vector dependence by the compiler because of the use of global variable.
Use the necessary #pragma to force reduction of the global variable in
order to enable vectorization.
c. Further improve the code execution by taking advantage of the latest
vector ISA supported on your CPU architecture running the UVM.
4. Remember to use the intel compilers and the -qopt-report options to verify
vectorization or the cause of non-vectorization. In your report, you should include
the following:
2
EDB4603 (DPC) Jan’22 – Lab 1
Requirements
1. You are required to complete a report for Part 1 and 2.
(a) The report must be typed.
(b) This report is to be submitted individually.
(c) Each part must include a step-by-step explanation followed by the
corresponding compilation results and performance comparison.
2. The report must be submitted in ULearn within FOUR (4) days from the final lab
session for this exercise.