Data Movement Is All You Need: A Case Study on Optimizing Transformers


METADATA ONLY
Loading...

Date

2021

Publication Type

Conference Paper

ETH Bibliography

yes

Citations

Altmetric
METADATA ONLY

Data

Rights / License

Abstract

Transformers are one of the most important machine learning workloads today. Training one is a very compute-intensive task, often taking days or weeks, and significant attention has been given to optimizing transformers. Despite this, existing implementations do not efficiently utilize GPUs. We find that data movement is the key bottleneck when training. Due to Amdahl's Law and massive improvements in compute performance, training has now become memory-bound. Further, existing frameworks use suboptimal data layouts. Using these insights, we present a recipe for globally optimizing data movement in transformers. We reduce data movement by up to 22.91% and overall achieve a 1.30x performance improvement over state-of-the-art frameworks when training a BERT encoder layer and 1.19x for the entire BERT. Our approach is applicable more broadly to optimizing deep neural networks, and offers insight into how to tackle emerging performance bottlenecks.

Publication status

published

Book title

Proceedings of Machine Learning and Systems

Journal / series

Volume

3

Pages / Article No.

711 - 732

Publisher

Systems and Machine Learning Foundation

Event

4th Conference on Machine Learning and Systems (MLSys 2021)

Edition / version

Methods

Software

Geographic location

Date collected

Date created

Subject

Organisational unit

03950 - Hoefler, Torsten / Hoefler, Torsten check_circle

Notes

Conference lecture held on April 6, 2021

Funding

Related publications and datasets