Abstract
Many recent machine learning models show dynamic shape characteristics. However, existing AI compiler optimization systems suffer a lot from problems brought by dynamic shape models, including compilation overhead, memory usage, optimization pipeline and deployment complexity. This paper provides a compiler system to natively support optimization for dynamic shape workloads, named DISC. DISC enriches a set of IR to form a fully dynamic shape representation. It generates the runtime flow at compile time to support processing dynamic shape based logic, which avoids the interpretation overhead at runtime and enlarges the opportunity of host-device co-optimization. It addresses the kernel fusion problem of dynamic shapes with shape propagation and constraints collecting methods. This is the first work to demonstrate how to build an end-to-end dynamic shape compiler based on MLIR infrastructure. Experiments show that DISC achieves up to 3.3× speedup than TensorFlow/PyTorch, and 1.8× than Nimble.
Author supplied keywords
Cite
CITATION STYLE
Zhu, K., Zhao, W. Y., Zheng, Z., Guo, T. Y., Zhao, P. Z., Bai, J. J., … Lin, W. (2021). DISC: A Dynamic Shape Compiler for Machine Learning Workloads. In Proceedings of the 1st Workshop on Machine Learning and Systems, EuroMLSys 2021 (pp. 89–95). Association for Computing Machinery, Inc. https://doi.org/10.1145/3437984.3458838
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.