当前位置: X-MOL 学术arXiv.cs.LG › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Towards High Performance, Portability, and Productivity: Lightweight Augmented Neural Networks for Performance Prediction
arXiv - CS - Machine Learning Pub Date : 2020-03-17 , DOI: arxiv-2003.07497
Ajitesh Srivastava (1), Naifeng Zhang (1), Rajgopal Kannan (2), Viktor K. Prasanna (1) ((1) University of Southern California, (2) US Army Research Lab-West)

Writing high-performance code requires significant expertise in the programming language, compiler optimizations, and hardware knowledge. This often leads to poor productivity and portability and is inconvenient for a non-programmer domain-specialist such as a Physicist. More desirable is a high-level language where the domain-specialist simply specifies the workload in terms of high-level operations (e.g., matrix-multiply(A, B)), and the compiler identifies the best implementation fully utilizing the heterogeneous platform. For creating a compiler that supports productivity, portability, and performance simultaneously, it is crucial to predict the performance of various available implementations (variants) of the dominant operations (kernels) contained in the workload on various hardware to decide (a) which variant should be chosen for each kernel in the workload, and (b) on which hardware resource the variant should run. To enable the performance prediction, we propose lightweight augmented neural networks for arbitrary combinations of kernel-variant-hardware. A key innovation is utilizing the mathematical complexity of the kernels as a feature to achieve higher accuracy. These models are compact to reduce training time and fast inference during compile-time and run-time. Using models with less than 75 parameters, and only 250 training data instances, we are able to obtain a low MAPE of 3%, significantly outperforming traditional feed-forward neural networks on 48 kernel-variant-hardware combinations. We further demonstrate that our variant-selection approach can be used in Halide implementations to obtain up to 1.7x speedup over Halide's auto-scheduler.

中文翻译:

迈向高性能、便携性和生产力:用于性能预测的轻量级增强神经网络

编写高性能代码需要在编程语言、编译器优化和硬件知识方面具有丰富的专业知识。这通常会导致生产力和可移植性较差,并且对于非程序员领域专家(如物理学家)来说是不方便的。更可取的是高级语言,其中领域专家根据高级操作(例如,矩阵乘法(A,B))简单地指定工作负载,并且编译器确定充分利用异构平台的最佳实现。为了创建同时支持生产力、可移植性和性能的编译器,预测各种硬件上工作负载中包含的主要操作(内核)的各种可用实现(变体)的性能至关重要,以决定 (a) 应为工作负载中的每个内核选择哪个变体,以及 (b)变体应该运行哪个硬件资源。为了实现性能预测,我们为内核-变体-硬件的任意组合提出了轻量级增强神经网络。一个关键的创新是利用内核的数学复杂性作为特征来实现更高的准确性。这些模型很紧凑,可以在编译时和运行时减少训练时间和快速推理。使用少于 75 个参数的模型,并且只有 250 个训练数据实例,我们能够获得 3% 的低 MAPE,在 48 种内核-变体-硬件组合上显着优于传统的前馈神经网络。我们进一步证明,我们的变体选择方法可用于 Halide 实现,以获得比 Halide 的自动调度程序高 1.7 倍的加速。
更新日期:2020-09-01
down
wechat
bug