Hidet: Task-Mapping Programming Paradigm for Deep Learning Tensor Programs

Yaoyao Ding, Cody Hao Yu, Bojian Zheng, Yizhi Liu, Yida Wang +1 more
10/18/2022
56 citations
cs.LGcs.AIcs.PL

Official code: hidet-org/hidet (743 stars, Python, Apache-2.0, last commit 2025-09-04). 1 more implementation below.

Abstract

As deep learning models nowadays are widely adopted by both cloud services and edge devices, reducing the latency of deep learning model inferences becomes crucial to provide efficient model serving. However, it is challenging to develop efficient tensor programs for deep learning operators due to the high complexity of modern accelerators and the rapidly growing number of operators.

Show full abstract

Deep learning compilers, such as Apache TVM, adopt declarative scheduling primitives to lower the bar of developing tensor programs. However, we show that this approach is insufficient to cover state-of-the-art tensor program optimizations. In this paper, we propose to embed the scheduling process into tensor programs and use dedicated mappings, called task mappings, to define the computation assignment and ordering. This new approach greatly enriches the expressible optimizations by allowing developers to manipulate tensor programs at a much finer granularity. We call the proposed method the task-mapping programming paradigm. In addition, we propose a new post-scheduling fusion optimization that allows developers to focus on scheduling every single operator and automates the fusion after scheduling. It greatly reduces the engineering efforts for operator fusion. Our proposed paradigm also constructs an efficient hardware-centric schedule space, which is agnostic to the program input size and greatly reduces the tuning time. With the proposed paradigm, we implement a deep learning compiler Hidet. Extensive experiments on modern convolution and transformer models show that Hidet outperforms state-of-the-art DNN inference framework, ONNX Runtime, and compiler, TVM equipped with scheduler AutoTVM and Ansor, by up to 1.48x (1.22x on average). It also reduces the tuning time by 20x and 11x compared with AutoTVM and Ansor, respectively. We open-sourced hidet at https://www.github.com/hidet-org/hidet.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
hidet-org/hidetOfficial743PythonApache-2.02025-09-04
yaoyaoding/hidet-artifactsCommunity9PythonApache-2.02023-04-24
hidet-org/hidetOfficial100%
Apache-2.0

An open-source efficient deep learning framework/compiler, written in python.

74373Python, C++Jan 4, 20221 years agoApache-2.0
compilerdeep-learningframeworkinference
Apache-2.0

This repository is the artifact of paper "Hidet: Task Mapping Programming Paradigm for Deep Learning Tensor Programs".

94Python, C++Oct 14, 20223 years agoApache-2.0
artifact-evaluationasplos23hidet

Similar Papers

Cite this paper

@article{ding2022hidet,
  title  = {Hidet: Task-Mapping Programming Paradigm for Deep Learning Tensor Programs},
  author = {Yaoyao Ding and Cody Hao Yu and Bojian Zheng and Yizhi Liu and Yida Wang and Gennady Pekhimenko},
  year   = {2022},
  eprint = {2210.09603},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.09603}
}

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/2210.09603.svg)](https://codeofpaper.com/paper/2210.09603)

Discussion