TenSet Cost Models
A learned cost model that ranks candidate tensor programs by predicted performance for a tensor compiler.
20 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 242.4K
- Operations
- 20
- Framework
- PyTorch
- Recurrent
- No
- Published
- NeurIPS 2021 Datasets and Benchmarks Track (Round 1)
- Authors
- Lianmin Zheng, Ruochen Liu, Junru Shao and others
- Source
- GitHub: tlc-pack/tenset
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m20928
- Graph hash
- 995637f7b275eed50f3798d625512b989ea01a0ad56992a34fe76faa7da49ebf
- Skeleton hash
- 66b901db4029e3bb75f1ccd5a284e2345384a607f83d287feb1f8ca6015ab799
- Architecture hash
- 6b07eba3ae4582755d5675aa228c69cf0487e59cc5b3fec08cec042dbf28f007
- Diagram SHA-256
- 04ad223ad5179fc602028d70006950bbc2ccf906fd145efadcafb40a8b45b213
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
The TenSet cost model estimates how well a candidate tensor program will perform, so that a search-based tensor compiler needs fewer slow measurements on the target device. It is trained on TenSet, a dataset of 52 million program performance records collected from 6 hardware platforms. The paper's case for the dataset is that, without one, some compilers collect their training data online during the search, which makes the search very time-consuming.
The model's goal is to rank the performance of different tensor programs in a given search space. Programs are presented as extracted features of variable length, and the paper describes the common approach of flattening their hierarchical structure and feeding it to feed-forward networks with padding or sum aggregation. Comparing architectures and loss functions on held-out networks, the paper finds that in general an MLP trained with a ranking loss performs best. The ranking loss is the probabilistic cost function that originated from LambdaRank.
The authors trained four MLP models with ranking loss, each on the dataset collected from a single hardware platform. They integrated the models into the Ansor auto-scheduler in TVM. The paper reports that the pre-trained cost model reduces the search time by up to 10× while maintaining the same search quality.
Key idea. TenSet provides 52 million tensor program performance records and shows that a cost model pre-trained on them can cut a tensor compiler's search time by up to 10×.
- TenSet
- TenSet cost model
- learned cost model
- tensor compiler
- tensor program performance
- program performance prediction
- auto-scheduler cost model
- MLP cost model
- ranking loss
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{tensetcostmodel2021,
title = {TenSet: A Large-scale Program Performance Dataset for Learned Tensor Compilers},
author = {Lianmin Zheng and Ruochen Liu and Junru Shao and Tianqi Chen and Joseph E. Gonzalez and Ion Stoica and Ameer Haj-Ali},
year = {2021},
journal = {NeurIPS 2021 Datasets and Benchmarks Track (Round 1)}
}