Precise hardware performance models play a crucial role in code optimizations. They can assist compilers in making heuristic decisions or aid autotuners in identifying the optimal configuration for a given program. For example, the autotuner for XLA, a machine learning compiler, discovered 10-20% speedup on state-of-the-art models serving substantial production traffic at Google. Although there exist a few datasets for program performance prediction, they target small sub-programs such as basic blocks or kernels. This paper introduces TpuGraphs, a performance prediction dataset on full tensor programs, represented as computational graphs, running on Tensor Processing Units (TPUs). Each graph in the dataset represents the main computation of a machine learning workload, e.g., a training epoch or an inference step. Each data sample contains a computational graph, a compilation configuration, and the execution time of the graph when compiled with the configuration. The graphs in the dataset are collected from open-source machine learning programs, featuring popular model architectures, e.g., ResNet, EfficientNet, Mask R-CNN, and Transformer. TpuGraphs provides 25x more graphs than the largest graph property prediction dataset (with comparable graph sizes), and 770x larger graphs on average compared to existing performance prediction datasets on machine learning programs. This graph-level prediction task on large graphs introduces new challenges in learning, ranging from scalability, training efficiency, to model quality.
翻译:精确的硬件性能模型在代码优化中发挥着关键作用,它们能辅助编译器做出启发式决策,或帮助自动调优器为给定程序确定最优配置。例如,机器学习编译器XLA的自动调优器在谷歌处理大量生产流量的先进模型上发现了10%-20%的加速效果。尽管已有少量面向程序性能预测的数据集,但它们仅针对基本块或内核等小型子程序。本文介绍TpuGraphs——一个针对在张量处理单元(TPU)上运行的完整张量程序的性能预测数据集,这些程序以计算图形式呈现。数据集中的每个图代表一项机器学习工作负载的主要计算,例如一个训练周期或推理步骤。每个数据样本包含一个计算图、一个编译配置以及以该配置编译后的图执行时间。数据集中的图来自开源机器学习程序,涵盖了ResNet、EfficientNet、Mask R-CNN和Transformer等流行模型架构。与最大的图属性预测数据集(在可比较的图规模下)相比,TpuGraphs提供的图数量多出25倍;而与现有面向机器学习程序的性能预测数据集相比,其平均图规模大770倍。这种针对大型图的预测任务在学习层面引入了从可扩展性、训练效率到模型质量的新挑战。