Second Assignment
Second Assignment
Computer Architecture II HW #2
SIMD Vectorization
Student ID 12028655
Introduction:
The second assignment focuses on the concept of vectorization. But what
exactly is vectorization? It's the process of transforming an algorithm so that
instead of working on individual values one by one, it operates on a group of
values simultaneously. In modern CPUs, there's direct support for vector
operations, where a single instruction can be applied to multiple data elements
(SIMD - Single Instruction Multiple Data -). With the evolution of multicore chip
design, software development has embraced task parallelism. Alongside this trend,
another type of parallelism has gained traction: instruction level parallelism. This
involves enhancing the ability of processors to execute multiple instructions
simultaneously. As the number of cores in CPUs increases, the width of SIMD
registers has also been progressively expanding.
Procedures:
matrix_matrix_sse.
An-Najah National University جامعة النجاح الوطنية
Faculty of Engineering and IT كلية الهندسة وتكنولوجيا المعلومات
Electrical and Computer Engineering دائرة الهندسة الكهربائية والحاسوب
Department
o
An-Najah National University جامعة النجاح الوطنية
Faculty of Engineering and IT كلية الهندسة وتكنولوجيا المعلومات
Electrical and Computer Engineering دائرة الهندسة الكهربائية والحاسوب
Department
And call the functions in order with, and I set the value for SIZE like as
128,256,512.
o We open Ubuntu and get to the location of the fil, for example the project
file is on disk D, then we will access it using this command
Matrix-Vector Multiplication
Input-size Scalar Vector Improvement (%)
128 0.000038 0.000024 1.58
256 0.000155 0.000088 1.76
512 0.000760 0.000350 2.17
Matrix-Matrix Multiplication
Input-size Scalar Vector Improvement (%)
128 0.004514 0.004323 1.044
256 0.037055 0.034092 1.086
512 0.327801 0.298169 1.099
Conclusion:
We observe that the most time-consuming operation is the matrix-matrix
vector multiplication.