Tensor Slicing and Optimization for Multicore NPUs

Rafael Sousa, Marcio Pereira, Yongin Kwon, Taeho Kim, Namsoon Jung +3 more
4/6/2023
cs.PFcs.ARcs.CV

No confident code implementation found for this paper.

Abstract

Although code generation for Convolution Neural Network (CNN) models has been extensively studied, performing efficient data slicing and parallelization for highly-constrai\-ned Multicore Neural Processor Units (NPUs) is still a challenging problem. Given the size of convolutions' input/output tensors and the small footprint of NPU on-chip memories, minimizing memory transactions while maximizing parallelism and MAC utilization are central to any effective solution. This paper proposes a TensorFlow XLA/LLVM compiler optimization pass for Multicore NPUs, called Tensor Slicing Optimization (TSO), which: (a) maximizes convolution parallelism and memory usage across NPU cores; and (b) reduces data transfers between host and NPU on-chip memories by using DRAM memory burst time estimates to guide tensor slicing. To evaluate the proposed approach, a set of experiments was performed using the NeuroMorphic Processor (NMP), a multicore NPU containing 32 RISC-V cores extended with novel CNN instructions. Experimental results show that TSO is capable of identifying the best tensor slicing that minimizes execution time for a set of CNN models. Speed-ups of up to 21.7\% result when comparing the TSO burst-based technique to a no-burst data slicing approach. To validate the generality of the TSO approach, the algorithm was also ported to the Glow Machine Learning framework. The performance of the models were measured on both Glow and TensorFlow XLA/LLVM compilers, revealing similar results.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{sousa2023tensor,
  title  = {Tensor Slicing and Optimization for Multicore NPUs},
  author = {Rafael Sousa and Marcio Pereira and Yongin Kwon and Taeho Kim and Namsoon Jung and Chang Soo Kim and Michael Frank and Guido Araujo},
  year   = {2023},
  eprint = {2304.03013},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.03013v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2304.03013.svg)](https://codeofpaper.com/paper/2304.03013)

Discussion