## 1 Introduction
As we are dealing with sparse matrices that hold most of the elements as zeros to avoid the problems created by sparse matrices, that is, time and space complexities, the BCSR format is used. The main aim of the proposed method is to allow users to automatically obtain the best configuration and performance for the implementation of SpMV calculations for any given sparse matrix. Based on the structure of the matrix, the AAQAL predicts the block size against any arbitrary sparse matrix. The suggested approach is primarily intended to enhance the performance optimization of existing contributions in this regard. Generally, the proposed approach involves three main phases: data preparation, training, and testing. Data preparation mainly comprises the selection of raw sparse matrices, application of BCSR storage format, feature extraction, selection of block size with minimum, maximum, and average execution times. After collecting this dataset,the dataset goes forward to the training phase. All matrices from different domains are collected through the SuiteSparse matrix market collection (UOF) [14] (see Figure 1). Matrices are converted from a matrix market format to BCSR. This conversion helped to remove the sparsity factor from the selected dataset. Subsequently, the sparse matrix-vector product computations were performed 2000 times with different block sizes to avoid any anomalies, and the minimum, maximum, and average execution times are recorded for each sparse matrix in the datasets. Moreover, in the next phase, the selected features along with the optimal number of block sizes are fed to the training phase. The target variable is the block size and is selected along with the minimum execution time for SpMV computations. The training datasets are used to train different base and ensemble predictive models, which include random forest (RF), decision tree (DT), AdaBoost (AB), gradient boosting (GB), and ridge regressor (RR). These models were evaluated with the help of two evaluation metrics: mean absolute error (MAE) and relative mean error (RME). This paper makes the following contributions. * Propose, implement, and evaluate a machine learning-based tool (AAQAL) that helps users to choose an optimal block size for SpMV computation in a shared memory architecture. * Train and test using nearly 700 real-world matrices obtained from 43 application domains, including linear programming, 2/3D problems, computer graphics, computer vision, and CFD. * Perform in-depth analysis and performance evaluation using different base and ensemble machine learning techniques and visualization. To the best of our knowledge, this work is the first to exploit the structure of the matrix to predict the near-optimal block size by using different base and ensemble machine learning predictive models. AAQAL is an Arabic word, which means \"intelligent\" or \"smart\". The remainder of this paper is organized as follows. A literature review and background information related to SpMV, BCSR, and machine learning algorithms are presented  
Figure 1: Data Preparation, training, and testing phases. in Section 2. Section 3 includes the proposed methodology and design. The detailed results and evaluation are presented in Section 4. Section 5 contains the conclusions of our research and suggests possible new directions for future research work. Table 1 lists the basic symbols used in this study.