Elegante+: A Machine Learning-Based Optimization Framework for Sparse Matrix–Vector Computations on the CPU Architecture
Sparse matrix–vector multiplication (SpMV) plays a significant role in the computational costs of many scientific applications such as 2D/3D robotics, power network problems, and computer vision. Numerous implementations using different sparse matrix formats have been introduced to optimize this ker...
Saved in:
| Main Authors: | , , , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
MDPI AG
2025-06-01
|
| Series: | Information |
| Subjects: | |
| Online Access: | https://www.mdpi.com/2078-2489/16/7/553 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1849406666057973760 |
|---|---|
| author | Muhammad Ahmad Sardar Usman Ameer Hamza Muhammad Muzamil Ildar Batyrshin |
| author_facet | Muhammad Ahmad Sardar Usman Ameer Hamza Muhammad Muzamil Ildar Batyrshin |
| author_sort | Muhammad Ahmad |
| collection | DOAJ |
| description | Sparse matrix–vector multiplication (SpMV) plays a significant role in the computational costs of many scientific applications such as 2D/3D robotics, power network problems, and computer vision. Numerous implementations using different sparse matrix formats have been introduced to optimize this kernel on CPUs and GPUs. However, due to the sparsity patterns of matrices and the diverse configurations of hardware, accurately modeling the performance of SpMV remains a complex challenge. SpMV computation is often a time-consuming process because of its sparse matrix structure. To address this, we propose a machine learning-based tool, namely Elegante+, that predicts optimal scheduling policies by analyzing matrix structures. This approach eliminates the need for repetitive trial and error, minimizes errors, and finds the best solution of the SpMV kernel, which enables users to make informed decisions about scheduling policies that maximize computational efficiency. For this purpose, we collected 1000+ sparse matrices from the SuiteSparse matrix market collection and converted them into the compressed sparse row (CSR) format, and SpMV computation was performed by extracting 14 key sparse matrix features. After creating a comprehensive dataset, we trained various machine learning models to predict the optimal scheduling policy, significantly enhancing the computational efficiency and reducing the overhead in high-performance computing environments. Our proposed tool, Elegante+ (XGB with all SpMV features), achieved the highest cross-validation score of 79% and performed five times faster than the default scheduling policy during SpMV in a high-performance computing (HPC) environment. |
| format | Article |
| id | doaj-art-e307b7abf84d463582a2005c0681a4aa |
| institution | Kabale University |
| issn | 2078-2489 |
| language | English |
| publishDate | 2025-06-01 |
| publisher | MDPI AG |
| record_format | Article |
| series | Information |
| spelling | doaj-art-e307b7abf84d463582a2005c0681a4aa2025-08-20T03:36:18ZengMDPI AGInformation2078-24892025-06-0116755310.3390/info16070553Elegante+: A Machine Learning-Based Optimization Framework for Sparse Matrix–Vector Computations on the CPU ArchitectureMuhammad Ahmad0Sardar Usman1Ameer Hamza2Muhammad Muzamil3Ildar Batyrshin4Centro de Investigación en Computación, Instituto Politécnico Nacional (CIC-IPN), Mexico City 07738, MexicoSchool of Informatics and Robotics, Institute of Arts and Culture, Lahore 54000, PakistanDepartment of Computer Science and Software Engineering, The Islamia University of Bahawapur, Bahawalpur 63100, PakistanDepartment of Computer Science and Software Engineering, The Islamia University of Bahawapur, Bahawalpur 63100, PakistanCentro de Investigación en Computación, Instituto Politécnico Nacional (CIC-IPN), Mexico City 07738, MexicoSparse matrix–vector multiplication (SpMV) plays a significant role in the computational costs of many scientific applications such as 2D/3D robotics, power network problems, and computer vision. Numerous implementations using different sparse matrix formats have been introduced to optimize this kernel on CPUs and GPUs. However, due to the sparsity patterns of matrices and the diverse configurations of hardware, accurately modeling the performance of SpMV remains a complex challenge. SpMV computation is often a time-consuming process because of its sparse matrix structure. To address this, we propose a machine learning-based tool, namely Elegante+, that predicts optimal scheduling policies by analyzing matrix structures. This approach eliminates the need for repetitive trial and error, minimizes errors, and finds the best solution of the SpMV kernel, which enables users to make informed decisions about scheduling policies that maximize computational efficiency. For this purpose, we collected 1000+ sparse matrices from the SuiteSparse matrix market collection and converted them into the compressed sparse row (CSR) format, and SpMV computation was performed by extracting 14 key sparse matrix features. After creating a comprehensive dataset, we trained various machine learning models to predict the optimal scheduling policy, significantly enhancing the computational efficiency and reducing the overhead in high-performance computing environments. Our proposed tool, Elegante+ (XGB with all SpMV features), achieved the highest cross-validation score of 79% and performed five times faster than the default scheduling policy during SpMV in a high-performance computing (HPC) environment.https://www.mdpi.com/2078-2489/16/7/553SpMVmachine learninghigh-performance computingSVMCSRsparse matrix |
| spellingShingle | Muhammad Ahmad Sardar Usman Ameer Hamza Muhammad Muzamil Ildar Batyrshin Elegante+: A Machine Learning-Based Optimization Framework for Sparse Matrix–Vector Computations on the CPU Architecture Information SpMV machine learning high-performance computing SVM CSR sparse matrix |
| title | Elegante+: A Machine Learning-Based Optimization Framework for Sparse Matrix–Vector Computations on the CPU Architecture |
| title_full | Elegante+: A Machine Learning-Based Optimization Framework for Sparse Matrix–Vector Computations on the CPU Architecture |
| title_fullStr | Elegante+: A Machine Learning-Based Optimization Framework for Sparse Matrix–Vector Computations on the CPU Architecture |
| title_full_unstemmed | Elegante+: A Machine Learning-Based Optimization Framework for Sparse Matrix–Vector Computations on the CPU Architecture |
| title_short | Elegante+: A Machine Learning-Based Optimization Framework for Sparse Matrix–Vector Computations on the CPU Architecture |
| title_sort | elegante a machine learning based optimization framework for sparse matrix vector computations on the cpu architecture |
| topic | SpMV machine learning high-performance computing SVM CSR sparse matrix |
| url | https://www.mdpi.com/2078-2489/16/7/553 |
| work_keys_str_mv | AT muhammadahmad eleganteamachinelearningbasedoptimizationframeworkforsparsematrixvectorcomputationsonthecpuarchitecture AT sardarusman eleganteamachinelearningbasedoptimizationframeworkforsparsematrixvectorcomputationsonthecpuarchitecture AT ameerhamza eleganteamachinelearningbasedoptimizationframeworkforsparsematrixvectorcomputationsonthecpuarchitecture AT muhammadmuzamil eleganteamachinelearningbasedoptimizationframeworkforsparsematrixvectorcomputationsonthecpuarchitecture AT ildarbatyrshin eleganteamachinelearningbasedoptimizationframeworkforsparsematrixvectorcomputationsonthecpuarchitecture |