paper-with-me

홈 › Papers

AKG: Automatic Kernel Generation for Neural Processing Units using Polyhedral Transformations

2021-06-19 · Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation 2021 6 · Jie Zhao, Bojie Li, Wang Nie, Zhen Geng, Renwei Zhang, Xiong Gao, Bin Cheng, Chen Wu, Yun Cheng, Zheng Li, Peng Di, Kun Zhang, Xuefeng Jin

Existing tensor compilers have proven their effectiveness in deploying deep neural networks on general-purpose hardware like CPU and GPU, but optimizing for neural processing units (NPUs) is still challenging due to the heterogeneous compute units and complicated memory hierarchy. In this paper, we present AKG, a tensor compiler for NPUs. AKG first lowers the tensor expression language to a polyhedral representation, which is used to automate the memory management of NPUs. Unlike existing approaches that resort to manually written schedules, AKG leverages polyhedral schedulers to perform a much wider class of transformations, and extends the semantics of the polyhedral representation to combine complex tiling techniques and hierarchical fusion strategies. We also implement the domain-specific optimization of convolution in AKG. Moreover, to achieve the optimal performance, we introduce complementary optimizations in code generation, which is followed by an auto-tuner. We conduct extensive experiments on benchmarks ranging from single operators to end-to-end networks. The experimental results show that AKG can obtain superior performance to both manual scheduling approaches and vendor provided libraries. We believe AKG will cast a light on the follow-up compiler works on NPUs.

📄 PDF Abstract BibTeX

Code (1)

mindspore-ai/akg mindspore

Tasks

Code GenerationCPUGPUManagementScheduling

Methods 이 논문이 사용한 방법론

Convolution A convolution is a type of matrix operation, consisting of a kernel, a small matrix of weights, that slides over input data performing element-wise multiplication with the…

Similar Papers 제목 키워드 기반

Stripe: Tensor Compilation via the Nested Polyhedral Model

2019-03-14 · Tim Zerrell, Jeremy Bruestle

Hardware architectures and machine learning (ML) libraries evolve rapidly. Traditional compilers often fail to generate high-performance code across the spectrum of new hardware offerings. To mitigate, engineers develop …

Code Generationmodel

PolyTOPS: Reconfigurable and Flexible Polyhedral Scheduler

2024-01-12 · Gianpietro Consolaro, Zhen Zhang, Harenome Razanajato, Nelson Lossing 외

Polyhedral techniques have been widely used for automatic code optimization in low-level compilers and higher-level processes. Loop optimization is central to this technique, and several polyhedral schedulers like Feautr…

Scheduling

PolyScientist: Automatic Loop Transformations Combined with Microkernels for Optimization of Deep Learning Primitives

2020-02-06 · Sanket Tavarageri, Alexander Heinecke, Sasikanth Avancha, Gagandeep Goyal 외

At the heart of deep learning training and inferencing are computationally intensive primitives such as convolutions which form the building blocks of deep neural networks. Researchers have taken two distinct approaches …

Deep Learning

AscendCraft: Automatic Ascend NPU Kernel Generation via DSL-Guided Transcompilation

2026-01-30 · Zhongzhen Wen, Shudi Shao, Zhong Li, Yu Ge 외 arxiv

The performance of deep learning models critically depends on efficient kernel implementations, yet developing high-performance kernels for specialized accelerators remains time-consuming and expertise-intensive. While r…

PAPI: Exploiting Dynamic Parallelism in Large Language Model Decoding with a Processing-In-Memory-Enabled Computing System

2025-02-21 · Yintao He, Haiyu Mao, Christina Giannoula, Mohammad Sadrosadati 외

Large language models (LLMs) are widely used for natural language understanding and text generation. An LLM model relies on a time-consuming step called LLM decoding to generate output tokens. Several prior works focus o…

Language ModelingLanguage ModellingLarge Language ModelNatural Language Understanding+2