## 1 Introduction  
The sparse matrix-vector product (SpMV) is considered to be the most important, time-consuming, and widely used scientific kernel [1] in various scientific disciplines such as computer graphics, computer vision [2; 3; 4; 5], robotics [3], 3D or 2D problems [4], acoustic problems [5; 6], thermal problems, healthcare, networking, operational research, and computational fluid dynamics (CFD). Different features influence the efficiency of SpMV computations [7]. These include the specifications of storage formats, sparsity patterns, and implementation of software and hardware platforms [8]. Over the years SpMV optimization has revolved around proposing new storage schemes (i.e., compressed sparse column (CSC), extended Block Compressed Sparse Row (BCSR) [9], compressed sparse row (CSR) [10], diagonal, hybrid coordinate format [9; 10]), developing software libraries (i.e., Intel MKL, Trillions Project [11], cuSPARSE [7], and Cusp [12]) and efficiently exploiting DRAM bandwidth and cache hierarchies [13]. The main objective of wide range of proposed optimization strategies is to reduce the overall work set of algorithms and the main advantage of blocking methods is same, as they allow more room for optimizing the computation of the kernel. By reducing the memory pressure, blocking methods leave more space for optimization, focusing on the computational chunk of the kernel, such as loop unrolling and vectorization, which can additionally improve execution. Random selection and trial and error experimentation for choosing the optimal block size are time consuming and error prone. Owing to the irregular structure of matrices, random selection of the block size needs to be repeated several times for each matrix. Our proposed solution overcome above mentioned problems associated with random selection of block sizes by predicting near optimal block size against any sparse matrix by primarily utilizing the structure of matrix. The contribution of this study revolves around the idea of proposing a machine learning-based performance optimization tool (AAQAL) for sparse matrix-vector products in shared memory architectures using BCSR format. For this purpose, we used different machine learning algorithms to predict the near-optimal block size and find the best solution for SpMV computation by exploiting the structure of the matrices. The proposed research was conducted in six phases: matrix collection, matrix conversion to BCSR format, data set preparation (SpMV computation using BCSR), feature extraction based on the structure of sparse matrices, machine learning-based predictive models, and evaluations of the models using mean absolute error (MAE) and relative mean error (RME). For our datasets, collections of matrices were sourced from the SuiteSparse Matrix Market Collection (UOF) [14]. We collected nearly 700 matrices from real-world problems targeting 43 different application domains. The sparse matrices are converted to B BCSR format, and different sparse matrix features are extracted. The minimum, maximum, and average execution times for different block sizes of a matrix have been attained. After preparation of our dataset, we used different base and ensemble machine learning models to predict the near-optimal block size for the best solution of SpMV by utilizing 80% of the dataset for training and the remaining 20% for testing. The proposed methodology requires sparse matrix features to be extracted first, for arbitrary sparse matrix, before it can make predictions. Our proposed tool (AAQAL) extracts sparse matrix features and based on these features only, predicts the optimal block size at runtime before actual execution of SpMV computation. The SpMV computation will then be performed with the predicted block size with a manual or random selection of block sizes (in practice) is error prone and time consuming. The intention to use BCSR storage format for computation is to reduce the sparsity structure and to combine the entries/elements block-wise containing certain information.