[Paper Review] Efficient and Generic 1D Dilated Convolution Layer for Deep Learning
This paper presents an optimized, generic 1D dilated convolution layer for x86 CPUs using LIBXSMM's BRGEMM kernel with Intel AVX-512 and BFloat16 instructions, achieving up to 80% theoretical peak efficiency on Cascade Lake and Cooper Lake CPUs. It demonstrates up to 2.27× speedup over eight V100 GPUs in end-to-end genomics training, with linear scaling across large datasets and diverse hyperparameters.
Convolutional neural networks (CNNs) have found many applications in tasks involving two-dimensional (2D) data, such as image classification and image processing. Therefore, 2D convolution layers have been heavily optimized on CPUs and GPUs. However, in many applications - for example genomics and speech recognition, the data can be one-dimensional (1D). Such applications can benefit from optimized 1D convolution layers. In this work, we introduce our efficient implementation of a generic 1D convolution layer covering a wide range of parameters. It is optimized for x86 CPU architectures, in particular, for architectures containing Intel AVX-512 and AVX-512 BFloat16 instructions. We use the LIBXSMM library's batch-reduce General Matrix Multiplication (BRGEMM) kernel for FP32 and BFloat16 precision. We demonstrate that our implementation can achieve up to 80% efficiency on Intel Xeon Cascade Lake and Cooper Lake CPUs. Additionally, we show the generalization capability of our BRGEMM based approach by achieving high efficiency across a range of parameters. We consistently achieve higher efficiency than the 1D convolution layer with Intel oneDNN library backend for varying input tensor widths, filter widths, number of channels, filters, and dilation parameters. Finally, we demonstrate the performance of our optimized 1D convolution layer by utilizing it in the end-to-end neural network training with real genomics datasets and achieve up to 6.86x speedup over the oneDNN library-based implementation on Cascade Lake CPUs. We also demonstrate the scaling with 16 sockets of Cascade/Cooper Lake CPUs and achieve significant speedup over eight V100 GPUs using a similar power envelop. In the end-to-end training, we get a speedup of 1.41x on Cascade Lake with FP32, 1.57x on Cooper Lake with FP32, and 2.27x on Cooper Lake with BFloat16 over eight V100 GPUs with FP32.
Motivation & Objective
- Address the lack of efficient, generic 1D convolution implementations for CPU-based deep learning workloads in genomics and speech processing.
- Optimize 1D dilated convolution layers for x86 CPUs with AVX-512 and BFloat16 instructions to improve performance and energy efficiency.
- Achieve high performance across a wide range of input widths, filter sizes, dilation rates, and channel configurations.
- Demonstrate scalability and efficiency on large-scale genomics datasets using multi-socket CPU systems.
- Outperform existing libraries like oneDNN and GPU-based implementations in real-world training scenarios.
Proposed method
- Leverage LIBXSMM’s batch-reduce GEMM (BRGEMM) kernel for single-precision (FP32) and BFloat16 (BF16) precision computations.
- Apply JIT code generation and cache blocking to optimize memory access patterns and improve data locality.
- Map 1D dilated convolutions to GEMM operations via im2col transformation, enabling reuse of highly optimized GEMM kernels.
- Use AVX-512 and AVX-512 BFloat16 instructions to exploit vector-level parallelism on modern Intel CPUs.
- Design a generic interface supporting variable input widths, filter sizes, dilation rates, and channel counts.
- Integrate the optimized layer into end-to-end training pipelines for real-world genomics models like AtacWorks.
Experimental results
Research questions
- RQ1Can a generic 1D dilated convolution layer be efficiently implemented on x86 CPUs using GEMM-based approaches and modern instruction sets?
- RQ2How does the performance of the proposed implementation compare to oneDNN and GPU-based (V100) implementations across diverse hyperparameters?
- RQ3To what extent does the optimized 1D convolution layer scale with increasing dataset size and multi-socket CPU configurations?
- RQ4What performance gains can be achieved using BFloat16 precision with AVX-512 on CPU-based genomics training workloads?
- RQ5Can the optimized layer handle memory-constrained scenarios with very long input sequences without out-of-memory errors?
Key findings
- The optimized 1D convolution layer achieves up to 80% theoretical peak performance on Intel Xeon Cascade Lake and Cooper Lake CPUs.
- On 16 sockets of Cascade Lake CPUs, the implementation achieves 1.41× speedup over eight V100 GPUs in FP32 training with the AtacWorks model.
- With BFloat16 precision, 16 sockets of Cooper Lake deliver 2.27× speedup over eight V100 GPUs, demonstrating the benefit of BFloat16 on CPUs.
- The implementation outperforms the oneDNN library across all tested configurations of input width, filter size, dilation, and channel count.
- The method scales linearly with dataset size: training time per epoch increased by ~9.16× when the training set size increased 9.16×, maintaining consistent performance.
- The implementation successfully trained on a 600,000-base signal track segment without out-of-memory errors, while the V100 GPU failed due to memory constraints.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.