硬件感知神经架构搜索基准:HW-NAS-Bench

HW-NAS-Bench:Hardware-Aware Neural Architecture Search Benchmark

摘要 Abstract

硬件感知神经架构搜索(HW-NAS)近年来因其能够自动化设计部署在资源受限的日常生活设备中的深度神经网络(DNNs)而受到极大关注。尽管其性能表现令人瞩目,但开发最优的HW-NAS解决方案仍然极具挑战性,因为这需要跨学科的知识,包括算法、微体系结构以及针对特定设备的编译技术。首先,现有工作大多采用预先收集的硬件成本查找表或针对特定设备的硬件成本模型来确定NAS流程中应包含的硬件成本,这些方法限制了HW-NAS创新的发展,并对非硬件专家设置了进入门槛。其次,类似于通用NAS,由于HW-NAS算法所需的计算资源庞大且所采用的搜索空间、超参数和硬件设备存在差异,因此对其进行基准测试也异常困难。为了解决这些问题,我们开发了HW-NAS-Bench,这是首个面向HW-NAS研究的公开数据集,旨在使非硬件专家也能参与HW-NAS研究,并提高HW-NAS研究的可重复性和易用性。为了构建HW-NAS-Bench,我们精心收集了NAS-Bench-201和FBNet搜索空间内所有网络在六种硬件设备上的测量/估算硬件性能数据,这些设备分为三类(即商用边缘设备、FPGA和ASIC)。此外,我们对HW-NAS-Bench中收集的数据进行了全面分析,为HW-NAS研究提供了深入见解。最后,我们展示了几个示例用例,证明了HW-NAS-Bench允许非硬件专家通过简单查询即可进行HW-NAS研究,并验证了专用的设备特定HW-NAS确实可以实现最优的精度-成本权衡。代码和所有收集的数据可在https://github.com/RICE-EIC/HW-NAS-Bench获取。

HardWare-aware Neural Architecture Search (HW-NAS) has recently gained tremendous attention by automating the design of DNNs deployed in more resource-constrained daily life devices. Despite its promising performance, developing optimal HW-NAS solutions can be prohibitively challenging as it requires cross-disciplinary knowledge in the algorithm, micro-architecture, and device-specific compilation. First, to determine the hardware-cost to be incorporated into the NAS process, existing works mostly adopt either pre-collected hardware-cost look-up tables or device-specific hardware-cost models. Both of them limit the development of HW-NAS innovations and impose a barrier-to-entry to non-hardware experts. Second, similar to generic NAS, it can be notoriously difficult to benchmark HW-NAS algorithms due to their significant required computational resources and the differences in adopted search spaces, hyperparameters, and hardware devices. To this end, we develop HW-NAS-Bench, the first public dataset for HW-NAS research which aims to democratize HW-NAS research to non-hardware experts and make HW-NAS research more reproducible and accessible. To design HW-NAS-Bench, we carefully collected the measured/estimated hardware performance of all the networks in the search spaces of both NAS-Bench-201 and FBNet, on six hardware devices that fall into three categories (i.e., commercial edge devices, FPGA, and ASIC). Furthermore, we provide a comprehensive analysis of the collected measurements in HW-NAS-Bench to provide insights for HW-NAS research. Finally, we demonstrate exemplary user cases to (1) show that HW-NAS-Bench allows non-hardware experts to perform HW-NAS by simply querying it and (2) verify that dedicated device-specific HW-NAS can indeed lead to optimal accuracy-cost trade-offs. The codes and all collected data are available at https://github.com/RICE-EIC/HW-NAS-Bench.