用设计空间探索与编译优化,让神经网络在RISC-V上更快运行。
Optimizing Tensor Train Decomposition in DNNs for RISC-V Architectures Using Design Space Exploration and Compiler Optimizations
- 通过剪枝低效分解方式缩小搜索空间
- 压缩后模型在RISC-V上推理速度提升3-8倍
- 适合边缘设备上的神经网络部署
深度神经网络(DNN)在自然语言处理和自动驾驶等场景中广泛应用,但在资源受限的RISC-V平台部署仍面临挑战,主要因全连接(FC)层计算与内存开销大。低秩分解(LRF)可压缩FC层,但其设计空间庞大,涉及计算量(FLOPs)、内存大小、推理时间和精度之间的复杂权衡,使优化过程耗时且复杂。本文提出端到端的LRF设计空间探索方法与专用工具,基于TensorFlow T3F库中的张量列车分解(TTD),先剔除效率低的分解结构和在RISC-V上表现差的方案,再应用编译优化提升自定义T3F层性能,显著降低推理时间并提高计算效率。实验表明,所提方法在相同压缩模型下,平均比IREE快3倍,比Pluto快8倍。该工作为基于RISC-V架构的边缘与嵌入式设备提供了高效的DNN部署方案。
原文摘要 · Abstract (English)
Deep neural networks (DNNs) have become indispensable in many real-life applications like natural language processing, and autonomous systems. However, deploying DNNs on resource-constrained devices, e.g., in RISC-V platforms, remains challenging due to the high computational and memory demands of fully connected (FC) layers, which dominate resource consumption. Low-rank factorization (LRF) offers an effective approach to compressing FC layers, but the vast design space of LRF solutions involves complex trade-offs among FLOPs, memory size, inference time, and accuracy, making the LRF process complex and time-consuming. This paper introduces an end-to-end LRF design space exploration methodology and a specialized design tool for optimizing FC layers on RISC-V processors. Using Tensor Train Decomposition (TTD) offered by TensorFlow T3F library, the proposed work prunes the LRF design space by excluding first, inefficient decomposition shapes and second, solutions with poor inference performance on RISC-V architectures. Compiler optimizations are then applied to enhance custom T3F layer performance, minimizing inference time and boosting computational efficiency. On average, our TT-decomposed layers run 3x faster than IREE and 8x faster than Pluto on the same compressed model. This work provides an efficient solution for deploying DNNs on edge and embedded devices powered by RISC-V architectures.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。