Optimization of Convolution Computation Based on CPU

In convolutional neural networks (CNNs), con-volution is one of the core computations, with most of the network's time spent on convolution calculations. Therefore, optimizing the efficiency of convolution computations is partic-ularly important in resource-constrained environments. CPUs are widely used across various devices, including cloud servers, edge devices, and mobile platforms. These devices do not always have access to dedicated GPUs, so efficient CPU-based convolutions enable the implementation of complex algorithms for low-latency, real-time inference on low-power platforms. In this paper, we propose an improved img2col+GEMM(General Matrix Multiply) convolutional optimization method based on the open-source library OpenBLAS. By leveraging In-tel AVX512 vectorization instructions and assembly-level in-struction reordering, we present a high-performance micro-kernel to optimize the GEMM operator. Additionally, we implement data reordering and memory alignment operations in the img2col process based on the aforementioned micro-kernel parameters, directly placing them into the buff of the GEMM process to save memory usage and access operations. Combining our micro-kernel with the OpenBLAS library, we achieve 98% of the performance of Intel's MKL on Intel CPUs, with a 10% to 15% performance improvement over OpenBLAS. The improved img2col method shows approximately a 16% enhancement in convolution speed compared to the standard img2col+GEMM approach.

Authors

Institutions

Publication Details

Published
2024-12-20
DOI
https://doi.org/10.1109/acai63924.2024.10899500
Primary Topic
Advanced Algorithms and Applications
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Optimization of Convolution Computation Based on CPU

Long Guo, Wei Ge, Shuang Li, JunJie Di
Advanced Algorithms and Applications
article

Optimization of Convolution Computation Based on CPU

Long Guo, Wei Ge, Shuang Li, JunJie Di
article en

Abstract

In convolutional neural networks (CNNs), con-volution is one of the core computations, with most of the network's time spent on convolution calculations. Therefore, optimizing the efficiency of convolution computations is partic-ularly important in resource-constrained environments. CPUs are widely used across various devices, including cloud servers, edge devices, and mobile platforms. These devices do not always have access to dedicated GPUs, so efficient CPU-based convolutions enable the implementation of complex algorithms for low-latency, real-time inference on low-power platforms. In this paper, we propose an improved img2col+GEMM(General Matrix Multiply) convolutional optimization method based on the open-source library OpenBLAS. By leveraging In-tel AVX512 vectorization instructions and assembly-level in-struction reordering, we present a high-performance micro-kernel to optimize the GEMM operator. Additionally, we implement data reordering and memory alignment operations in the img2col process based on the aforementioned micro-kernel parameters, directly placing them into the buff of the GEMM process to save memory usage and access operations. Combining our micro-kernel with the OpenBLAS library, we achieve 98% of the performance of Intel's MKL on Intel CPUs, with a 10% to 15% performance improvement over OpenBLAS. The improved img2col method shows approximately a 16% enhancement in convolution speed compared to the standard img2col+GEMM approach.

Harbin Engineering University (CN)
Fundamental Research Funds for the Central Universities
Affordable and clean energy
Openalex Percentile: Top 65%
Advanced Algorithms and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.