HackerPapers

arXiv:2006.06762cs.LG

Ansor: Generating High-Performance Tensor Programs for Deep Learning

Lianmin Zheng, Chengfan Jia, Minmin Sun, Zhao Wu, Cody Hao Yu, Ameer Haj-Ali, Yida Wang, Jun Yang, Danyang Zhuo, Koushik Sen, Joseph E. Gonzalez, Ion Stoica

Abstract

High-performance tensor programs are crucial to guarantee efficient execution of deep neural networks. However, obtaining performant tensor programs for different operators on various hardware platforms is notoriously challenging. Currently, deep learning systems rely on vendor-provided kernel libraries or various search strategies to get performant tensor programs. These approaches either require significant engineering effort to develop platform-specific optimization code or fall short of finding high-performance programs due to restricted search space and ineffective exploration strategy. We present Ansor, a tensor program generation framework for deep learning applications. Compared with existing search strategies, Ansor explores many more optimization combinations by sampling programs from a hierarchical representation of the search space. Ansor then fine-tunes the sampled programs with evolutionary search and a learned cost model to identify the best programs. Ansor can find high-performance programs that are outside the search space of existing state-of-the-art approaches. In addition, Ansor utilizes a task scheduler to simultaneously optimize multiple subgraphs in deep neural networks. We show that Ansor improves the execution performance of deep neural networks relative to the state-of-the-art on the Intel CPU, ARM CPU, and NVIDIA GPU by up to $3.8\times$, $2.6\times$, and $1.7\times$, respectively.

arXiv comments
OSDI 2020
Journal reference
DOI
Subjects
cs.LGMachine Learning cs.NENeural and Evolutionary Computing cs.PFPerformance cs.PLProgramming Languages stat.MLMachine Learning (Statistics)

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Jul 2021 to Dec 2021.

Comments linking this paper, per year.

Discussed in comments2 threads

    • Oh indeed I misread, thanks for the correction. Note though that TVM is also using ML in the compiler: https://arxiv.org/abs/2006.06762

      m3atView on HNParent context

    • Note, that there is a new (substantially accelerated) "autoscheduler" implementation in TVM (one of competitors in the article linked), details can be found in https://arxiv.org/abs/2006.06762

      mshachkovView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.