Visual Journal of Technical and Vocational Education

Visual Journal of Technical and Vocational Education

Efficient Implementation of Matrix-Matrix Multiplication using SIMD and OpenMP Models on CPU Platforms

Document Type : Original Article

Authors
1 Electrical and Computer Engineering, Chamran College, Technical and Vocational University (TVU), Rasht, Iran.
2 Computer Engineering Department, Guilan University, Rasht, Iran
Abstract
Modern CPUs and GPUs come with multiple processing units, enabling the parallel execution of tasks, which enhances overall system performance. Various parallel programming models have been developed to take full advantage of this parallelism. For computation-heavy applications, such as matrix-matrix multiplication—a key operation in linear algebra frequently applied in scientific simulations and multimedia processing—achieving efficient implementation is essential to fully utilize hardware resources. This paper explores optimized implementations of matrix-matrix multiplication using several parallel programming techniques: SIMD, OpenMP, a Hybrid OpenMP-SIMD model, and OpenCL. Our experimental results highlight the effectiveness of these approaches, with observed speedups of up to 6.5x using SIMD, 3.2x with OpenMP, 16.7x via hybrid OpenMP-SIMD, and a notable 32x speedup with OpenCL, compared to a highly optimized serial baseline. These results demonstrate significant performance improvements when leveraging parallelism for matrix-matrix multiplication. This paper focuses on efficiently implementing matrix-matrix multiplication using popular parallel programming models: SIMD, OpenMP, Hybrid OpenMP-SIMD, and OpenCL. Our experimental results demonstrate the effectiveness of our implementations for different matrix sizes. Compared to an optimized serial implementation, we achieve significant speedups of up to 6.5x for SIMD, 3.2x for OpenMP, 16.7x for hybrid OpenMP-SIMD, and an impressive 32x for OpenCL implementations.
Keywords
Subjects


Articles in Press, Accepted Manuscript
Available Online from 17 November 2024

  • Receive Date 21 October 2023
  • Revise Date 20 October 2024
  • Accept Date 12 November 2024