UniCoMo: A Unified Learning-Based Cost Model for Tensorized Program Tuning
Tensorized programs use hardware intrinsics on accelerators to significantly improve tensor computation performance. The trend of hardware customization has led to the emergence of massive hardware accelerators and intrinsics, which poses a significant engineering challenge for manually coding efficient tensorized programs. Tensorized program tuning in deep learning compilers (DLCs) is considered an effective approach to address the challenge. At the core of program tuning relies the design of the cost model, but currently there is still a lack of cost models specifically designed for tensorized programs, which hampers the co-optimization of DLCs and hardware accelerators. In this paper, we propose UniCoMo, a unified cost model for tensorized program tuning on various hardware platforms and hardware intrinsics. We first analyze the design challenges introduced by tensorized programs for cost models in terms of feature representation and transfer prediction. And then, for feature representation, we propose a unified feature representation for tensorized programs by using program behavior as a template, mining program features with the schedule attention matrix, and incorporating hardware intrinsic abstraction. For transfer prediction, we propose a unified transfer prediction strategy for tensorized program cost model based on lifelong learning and transfer learning. To meet training and testing requirements, we constructed a dataset dedicated to tensorized program tuning. Results show that UniCoMo maintains the state-of-the-art accuracy while significantly improving adaptability to diverse execution environments and enabling flexible transfer prediction. It can speed up search time by 9.8× and improve inference speed by 1.9× open-sourced at https://github.com/ZhW-loop/UniCoMo.
Authors
- Chao Wang (ORCID: https://orcid.org/0000-0002-9403-5575)
- Wenqi Lou (ORCID: https://orcid.org/0000-0002-2240-6672)
- Lei Gong (ORCID: https://orcid.org/0000-0002-8391-5526)
- Xuehai Zhou (ORCID: https://orcid.org/0000-0002-8360-3143)
- Zihan Wang (ORCID: https://orcid.org/0000-0001-8611-3679)
- Xianglan Chen (ORCID: https://orcid.org/0009-0007-7845-3068)
- Qianyu Cheng
Publication Details
- Published
- 2024-11-18
- DOI
- https://doi.org/10.1109/iccd63220.2024.00081
- Citations
- 2
- Primary Topic
- Evolutionary Algorithms and Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.69
Funders
- National Natural Science Foundation of China
- Natural Science Foundation of Jiangsu Province
- Youth Innovation Promotion Association of the Chinese Academy of Sciences
- National Key Research and Development Program of China