A Convolutional Operator Search Method Based on XGBoost with Nearest Neighbor Search Convolutional operator search Convolutional operator search in math libraries
YunLong Fu, TengFei Wang, MengZhi Han · 2025
Convolutional Neural Network is a deep learning framework widely used in image recognition, speech recognition, and autonomous driving. The convolution operator is the basis of convolutional neural network implementation, which determines its training and inference speed. Deep learning mathematical libraries have done a lot of optimization of convolutional operators, for the same convolutional parameters, on the same hardware, there are multiple operators can achieve the convolutional operation, however, due to the different code optimization of each operator, so their performance is different, the performance gap may be up to hundreds of times, how to choose the optimal operator has become an urgent problem. Traditional methods, such as traversing all operators to find the optimal operator, are time-consuming and inefficient; and the split-point method not only relies on the experience of engineers but also consumes a lot of resources. Therefore, this paper proposes an optimal search method combining XGBoost and neighborhood search strategy. The method first uses the base dataset to train the model initially, and for the data points with poor prediction effect, combines this data point with its neighboring points through nearest neighbor search, and dynamically adds new samples to the dataset to iterate the model. When a test set converges, a new test set is generated by randomly arranging the network data, and the model continues to be iterated until the model converges to the new test set, at which time the model can cover most of the network parameters. Experimental results show that this method can achieve more than 95% of the time consuming problem solving using the optimal operator and the prediction time is within a few tens of microseconds, which can effectively solve the difficult problems faced by engineering nowadays.