CPC G06F 17/16 (2013.01) [G06N 3/08 (2013.01)] | 8 Claims |
1. A method for predicting the operation time of sparse matrix vector multiplication, wherein comprising the following steps:
constructing a convolutional neural network, wherein the convolutional neural network comprises an input layer, a feature processing layer, a data splicing layer and an output layer, the input layer is used for inputting features of a row feature matrix, a column feature matrix and an architecture parameter expansion matrix in a sparse matrix, the feature processing layer is used for extracting features in a previous layer, the data splicing layer is used for splicing the extracted features of the row feature matrix, the column feature matrix and the architecture parameter extension matrix, and the output layer is used for outputting prediction results;
acquiring a plurality of groups of sparse matrices with known sparse matrix vector multiplication operation time as sample data, and inputting the sample data into the convolutional neural network to train the convolutional neural network, wherein acquiring a plurality of groups of sparse matrices with known sparse matrix vector multiplication operation time as sample data, and inputting the sample data into the convolutional neural network to train the convolutional neural network comprise:
extracting row feature matrices and column feature matrices with a preset size of 128×128 from the plurality of groups of sparse matrices, and applying a yet Another Sparse matrix vector multiplication (yaSpMV) open source tool to the sparse matrix to obtain a 14-dimensional architecture parameter vector and the sparse matrix vector multiplication operation time, wherein the architecture parameter vector is added with the number of non-zero elements of the sparse matrix to form a 15-dimensional architecture parameter vector, which is expanded into a 128×128 architecture parameter expansion matrix;
inputting the sparse matrix to be classified into the trained convolutional neural network to realize the prediction of the operation time of sparse matrix vector multiplication; and
optimizing performance of an application based on the realized prediction of the operation time of the sparce matrix vector multiplication.
|