Vector Parallelism

Overview

  • Tutorial: 20 min

  • Exercises: 5 min

    Objectives:
    1. Learn about vector parallelism.

What is vectorization?

Vectorization is a technique used in computer architecture and programming to enhance performance by processing multiple data points with a single instruction - SIMD (Single Instruction, Multiple Data) instructions.

../_images/vectorPrallelism.drawio.png

A core is an individual processing unit within a CPU, each capable of executing instructions independently.

How does vectorization influence peformance?

Vector processors are specialized hardware designed to handle vector operations.

  1. Increased Throughput: By processing multiple data elements per instruction, vectorization can significantly speed up computations.

  2. Efficiency: Reduces the number of instructions needed, leading to more efficient use of the CPU.

The effectiveness of vector parallelism depends on the vector length, which is the number of data elements a vector processor can handle in parallel.

We will use Numba to vectorize python code.

Exercise

  1. What is the speedup achieved through vectorization?

1qsub 2_vectorize.pbs

Key Points

  1. Vector parallelism can improve the peformance of the application.

  2. Vector length decides the limit of vector parallelism.

  3. Numba provides an easy way to vectorize code in Python.