ARTÍCULO
TITULO

Optimizing Deep Learning RNN Topologies on Intel Architecture

Kunal Banerjee    
Evangelos Georganas    
Dhiraj D. Kalamkar    
Barukh Ziv    
Eden Segal    
Cristina Anderson    
Alexander Heinecke    

Resumen

Recurrent neural network (RNN) models have been found to be well suited for processing temporal data. In this work, we present an optimized implementation of vanilla RNN cell and its two popular variants: LSTM and GRU for Intel Xeon architecture. Typical implementations of these RNN cells employ one or two large matrix multiplication (GEMM) calls and then apply the element-wise operations (sigmoid/tanh) onto the GEMM results. While this approach is easy to implement by exploiting vendor-optimized GEMM library calls, the data reuse relies on how GEMMs are parallelized and is sub-optimal for GEMM sizes stemming from small minibatch. Also, the element-wise operations are exposed as a bandwidth-bound kernel after the GEMM which is typically a compute-bound kernel. To address this discrepancy, we implemented a parallel blocked matrix GEMM in order to (a) achieve load balance, (b) maximize weight matrix reuse, (c) fuse the element-wise operations after partial GEMM blocks are computed and while they are hot in cache. Additionally, we bring the time step loop in our cell to further increase the weight reuse and amortize the overhead to transform the weights into blocked layout. The results show that our implementation is generally faster than Intel MKL-DNN library implementations, e.g. for RNN, forward pass is up to ~3× faster whereas the backward/weight update pass is up to ~5× faster. Furthermore, we investigate high-performance implementations of sigmoid and tanh activation functions that achieve various levels of accuracy. These implementations rely on minimax polynomial approximations, rational polynomials, Taylor expansions and exponential approximation techniques. Our vectorized implementations can be flexibly integrated into deep learning computations with different accuracy requirements without compromising performance; in fact, these are able to outperform vectorized and reduced accuracy vendor-optimized (Intel SVML) libraries by 1.6?2.6× while speep up over GNU libm is close to two orders of magnitude. All our experiments are conducted on Intel?s latest CascadeLake architecture.

 Artículos similares

       
 
Margarida Mendonça and Álvaro Figueira    
As social media (SM) becomes increasingly prevalent, its impact on society is expected to grow accordingly. While SM has brought positive transformations, it has also amplified pre-existing issues such as misinformation, echo chambers, manipulation, and ... ver más
Revista: Informatics

 
Zeqin Tian, Dengfeng Chen and Liang Zhao    
Accurate building energy consumption prediction is a crucial condition for the sustainable development of building energy management systems. However, the highly nonlinear nature of data and complex influencing factors in the energy consumption of large ... ver más
Revista: Applied Sciences

 
Dongye Lv, Hanbing Liu, Qiang Miao, Wensheng Wang, Guojin Tan, Chengwei Shi and Hanjun Li    
The passivation behavior of steel reinforcements in concrete is significantly influenced by the environment, concrete pore solution, and the passive film formed on the steel surface. The present study used electrochemical methods to successfully characte... ver más
Revista: Applied Sciences

 
Junling Zhang, Min Mei, Jun Wang, Guangpeng Shang, Xuefeng Hu, Jing Yan and Qian Fang    
The deformation of tunnel support structures during tunnel construction is influenced by geological factors, geometrical factors, support factors, and construction factors. Accurate prediction of tunnel support structure deformation is crucial for engine... ver más
Revista: Applied Sciences

 
Yongbo Liu, Peng He, Yan Cao, Conghua Zhu and Shitao Ding    
A critical precondition for realizing mechanized transplantation in rice cultivation is the implementation of seedling tray techniques. To augment the efficacy of seeding, a precise evaluation of the quality of rice seedling cultivation in these trays is... ver más
Revista: Applied Sciences