journal article·2022-07-13Open access

AAQAL: A Machine Learning-Based Tool for Performance Optimization of Parallel SPMV Computations Using Block CSR

Muhammad Ahmed, Sardar Usman, Nehad Ali Shah, M. Usman Ashraf, Ahmed Mohammed Alghamdi, Adel A. Bahadded, Khalid Ali Almarhabi

Applied Sciences· Volume 12· Issue 14

Abstract

The sparse matrix–vector product (SpMV), considered one of the seven dwarfs (numerical methods of significance), is essential in high-performance real-world scientific and analytical applications requiring solution of large sparse linear equation systems, where SpMV is a key computing operation. As the sparsity patterns of sparse matrices are unknown before runtime, we used machine learning-based performance optimization of the SpMV kernel by exploiting the structure of the sparse matrices using the Block Compressed Sparse Row (BCSR) storage format. As the structure of sparse matrices varies across application domains, optimizing the block size is important for reducing the overall execution time. Manual allocation of block sizes is error prone and time consuming. Thus, we propose AAQAL, a data-driven, machine learning-based tool that automates the process of data distribution and selection of near-optimal block sizes based on the structure of the matrix. We trained and tested the tool using different machine learning methods—decision tree, random forest, gradient boosting, ridge regressor, and AdaBoost—and nearly 700 real-world matrices from 43 application domains, including computer vision, robotics, and computational fluid dynamics. AAQAL achieved 93.47% of the maximum attainable performance with a substantial difference compared to in practice manual or random selection of block sizes. This is the first attempt at exploiting matrix structure using BCSR, to select optimal block sizes for the SpMV computations using machine learning techniques.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Parallel Computing and Optimization Techniques · Advanced Data Storage Technologies · Stochastic Gradient Optimization Techniques

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Software Engineering, Islamia University Bahawalpur, Bahawalpur 63100, Pakistan

Department of Computer Science and Software Engineering, Gran Asian University Sialkot, Sialkot 53310, Pakistan

Department of Mechanical Engineering, Sejong University, Seoul 05006, Korea

Department of Computer Science, Government College Women University, Sialkot 53310, Pakistan

Department of Software Engineering, College of Computer Science and Engineering, University of Jeddah, Jeddah 21493, Saudi Arabia

Department of Information System, Faculty of Computing and Information Technology, King Abdulaziz University, Jeddah 21589, Saudi Arabia

Department of Computer Science, College of Computing in Al-Qunfudah, Umm Al-Qura University, Makkah 24381, Saudi Arabia

Funding

Deanship of Scientific Research (DSR), King Abdulaziz University, Jeddah, Saudi Arabia

References (43)

Show source-provided references
1. Xie, K., Lee, C.-R., and Liu, F.-Y. (2019, January 9–12). Performance Optimization of SpMV on Spark. Proceedings of the 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, CA, USA.10.1109/BigData47090.2019.9006323 ↗
2. Midgar: Detection of people through computer vision in the Internet of Things scenarios to improve the security in Smart Cities, Smart Towns, and Smart Homes10.1016/j.future.2016.12.033 ↗
3. Rahman, A., Jin, J., Cricenti, A., Rahman, A., Palaniswami, M., and Luo, T. (2016). Cloud-enhanced robotic system for smart city crowd control. J. Sens. Actuator Netw., 5.10.3390/jsan5040020 ↗
4. 3D design and modeling of smart cities from a computer graphics perspective
5. Crowd-sensing our smart cities: A platform for noise monitoring and acoustic urban planning10.24138/jcomss.v13i2.373 ↗
6. Bello, J.P., Mydlarz, C., and Salamon, J. (2018). Sound analysis in smart cities. Computational Analysis of Sound Scenes and Events, Springer.10.1007/978-3-319-63450-0_13 ↗
7. NVIDIA (2022, May 04). [Online]. Available online: https://developer.nvidia.com/cusparse.
8. Mehmood, R., and Crowcroft, J. (2005). Parallel Iterative Solution Method for Large Sparse Linear Equation Systems, University of Cambridge, Computer Laboratory.
9. A view of the parallel computing landscape10.1145/1562764.1562783 ↗
10. Sun, H., Gainaru, A., Shantharam, M., and Raghavan, P. (2020, January 9–11). Selective Protection for Sparse Iterative Solvers to Reduce the Resilience Overhead. Proceedings of the 2020 IEEE 32nd International Symposium on Computer Architecture and High Performance Computing (SBAC-PAD), Porto, Portugal.10.1109/SBAC-PAD49847.2020.00029 ↗
11. BiELL: A bisection ELLPACK-based storage format for optimizing SpMV on GPUs10.1016/j.jpdc.2014.03.002 ↗
12. Kourtis, K., Goumas, G., and Koziris, N. (2008, January 5–7). Optimizing sparse matrix-vector multiplication using index and value compression. Proceedings of the 5th Conference on Computing Frontiers, Ischia, Italy.10.1145/1366230.1366244 ↗
13. Grossman, M., Thiele, C., Araya-Polo, M., Frank, F., Alpak, F.O., and Sarkar, V. (2016). A survey of sparse matrix-vector multiplication performance on large matrices. arXiv.
14. Pinar, A., and Heath, M.T. (1999, January 14–19). Improving performance of sparse matrix-vector multiplication. Proceedings of the SC’99: Proceedings of the 1999 ACM/IEEE Conference on Supercomputing, Portland, OR, USA.10.1145/331532.331562 ↗
15. Kourtis, K., Goumas, G., and Koziris, N. (2008, January 9–12). Improving the performance of multithreaded sparse matrix-vector multiplication using index and value compression. Proceedings of the 2008 37th International Conference on Parallel Processing, Portland, OR, USA.10.1109/ICPP.2008.62 ↗
16. (2022, April 12). HSA: Heterogeneous System Architecture. Available online: http://hsafoundation.com/.
17. Siddiqui, N., Yousaf, F., Murtaza, F., Ehatisham-ul-Haq, M., Ashraf, M.U., Alghamdi, A.M., and Alfakeeh, A.S. (2020). A highly nonlinear substitution-box (S-box) design using action of modular group on a projective line over a finite field. PLoS ONE, 15.10.1371/journal.pone.0241890 ↗
18. Measuring the Impact of Scope Changes on Project Plan Using EVM10.1109/ACCESS.2020.3018169 ↗
19. Manzoor, A., Ahmad, W., Ehatisham-ul-Haq, M., Hannan, A., Khan, M.A., Ashraf, M.U., Alghamdi, A.M., and Alfakeeh, A.S. (2020). Inferring Emotion Tags from Object Images Using Convolutional Neural Network. Appl. Sci., 10.10.3390/app10155333 ↗
20. Shinan, K., Alsubhi, K., Alzahrani, A., and Ashraf, M. (2021). Machine Learning-Based Botnet Detection in Software-Defined Network: A Systematic Review. Symmetry, 13.10.3390/sym13050866 ↗
21. Im, E.-J., and Yelick, K.A. (1999, January 22–24). Optimizing Sparse Matrix Vector Multiplication on SMP. Proceedings of the PPSC, San Antonio, TX, USA.
22. Im, E.-J., and Yelick, K. (2001, January 28–30). Optimizing sparse matrix computations for register reuse in SPARSITY. Proceedings of the International Conference on Computational Science, San Francisco, CA, USA.10.1007/3-540-45545-0_22 ↗
23. Willcock, J., and Lumsdaine, A. (July, January 28). Accelerating sparse matrix computations via data compression. Proceedings of the 20th annual International Conference on Supercomputing, Cairns, Australia.
24. Razzaq, J., Berrendorf, R., Hack, S., Weierstall, M., and Mannuss, F. (2016, January 9–13). Fixed and variable sized block techniques for sparse matrix vector multiplication with general matrix structures. Proceedings of the Tenth International Conference on Advanced Engineering Computing and Applications in Sciences, Venice, Italy.
25. Kannan, R. (2013, January 18–21). Efficient sparse matrix multiple-vector multiplication using a bitmapped format. Proceedings of the 20th Annual International Conference on High Performance Computing, Bengaluru, India.10.1109/HiPC.2013.6799135 ↗
26. yaSpMV: Yet another SpMV framework on GPUs10.1145/2692916.2555255 ↗
27. Vuduc, R.W., and Moon, H.-J. (2006, January 13–15). Fast sparse matrix-vector multiplication by exploiting variable block structure. Proceedings of the International Conference on High Performance Computing and Communications, Munich, Germany.10.2172/891708 ↗
28. Karakasis, V., Goumas, G., and Koziris, N. (2009, January 22–25). Perfomance models for blocked sparse matrix-vector multiplication kernels. Proceedings of the 2009 International Conference on Parallel Processing, Vienna, Austria.10.1109/ICPP.2009.21 ↗
29. An extended compression format for the optimization of sparse matrix-vector multiplication10.1109/TPDS.2012.290 ↗
30. Buluç, A., Fineman, J.T., Frigo, M., Gilbert, J.R., and Leiserson, C.E. (2009, January 11–13). Parallel sparse matrix-vector and matrix-transpose-vector multiplication using compressed sparse blocks. Proceedings of the Twenty-First Annual Symposium on Parallelism in Algorithms and Architectures, Calgary, AB, Canada.10.1145/1583991.1584053 ↗
31. Martone, M., Filippone, S., Tucci, S., Gepner, P., and Paprzycki, M. (2010, January 18–20). Use of hybrid recursive csr/coo data structures in sparse matrix-vector multiplication. Proceedings of the International Multiconference on Computer Science and Information Technology, Wisla, Poland.10.1109/IMCSIT.2010.5680039 ↗
32. Belgin, M., Back, G., and Ribbens, C.J. (2009, January 8–12). Pattern-based sparse matrix representation for memory-efficient SMVM kernels. Proceedings of the 23rd International Conference on Supercomputing, Yorktown Heights, NY, USA.10.1145/1542275.1542294 ↗
33. Hannan, A., Hussain, F., Ali, N., Ehatisham-Ul-Haq, M., Ashraf, M.U., Alghamdi, A.M., and Alfakeeh, A.S. (2021). A decentralized hybrid computing consumer authentication framework for a reliable drone delivery as a service. PLoS ONE, 16.10.1371/journal.pone.0250737 ↗
34. Solution of combined economic emission dispatch problem using improved and chaotic population-based polar bear optimization algorithm10.1109/ACCESS.2021.3072012 ↗
35. Breast Cancer Classification From Histopathological Images Using Patch-Based Deep Learning Modeling10.1109/ACCESS.2021.3056516 ↗
36. Usman, S., Mehmood, R., Katib, I., Albeshri, A., and Altowaijri, S.M. (2019). ZAKI: A smart method and tool for automatic performance optimization of parallel SpMV computations on distributed memory machines. Mob. Netw. Appl., 1–20.10.1007/s11036-019-01318-3 ↗
37. CASpMV: A customized and accelerative SPMV framework for the sunway TaihuLight10.1109/TPDS.2019.2907537 ↗
38. Anzt, H., Tsai, Y.M., Abdelfattah, A., Cojean, T., and Dongarra, J. (2020, January 12). Evaluating the Performance of NVIDIA’s A100 Ampere GPU for Sparse and Batched Computations. Proceedings of the 2020 IEEE/ACM Performance Modeling, Benchmarking and Simulation of High Performance Computer Systems (PMBS), Atlanta, GA, USA.10.1109/PMBS51919.2020.00009 ↗
39. ZAKI+: A machine learning based process mapping tool for SpMV computations on distributed memory architectures10.1109/ACCESS.2019.2923565 ↗
40. The University of Florida sparse matrix collection
41. Performance and power efficient massive parallel computational model for HPC heterogeneous exascale systems10.1109/ACCESS.2018.2823299 ↗
42. Alsubhi, K., Alsolami, F., Algarni, A., Albassam, E., Khemakhem, M., Eassa, F., Jambi, K., and Ashraf, M.U. (2019, January 3–7). A Tool for Translating sequential source code to parallel code written in C++ and OpenACC. Proceedings of the 2019 IEEE/ACS 16th International Conference on Computer Systems and Applications (AICCSA), Abu Dhabi, United Arab Emirates.10.1109/AICCSA47632.2019.9035292 ↗
43. AAP4All: An Adaptive Auto Parallelization of Serial Code for HPC Systems10.32604/iasc.2021.019044 ↗