面向RISC-V架构的深度学习算子测试
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311

基金项目:

国家重点研发计划(2024YFF0908004); 国家自然科学基金(U24A20337, 62372228); 深港澳科技计划(C类) (SGDX20230821091559018)


Deep Learning Operator Testing for RISC-V Architecture
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    随着边缘计算和端侧智能软件的发展, RISC-V 架构因其开源、模块化及低成本优势在学术界和产业界受到广泛关注. 然而, 将智能软件部署到RISC-V架构上面临诸多挑战. 智能软件的运行依赖于执行卷积、矩阵乘法、归一化等基本张量运算的深度学习算子, 一旦算子出现问题, 将直接影响上层大量智能软件的执行效率、准确性和可靠性, 因此算子质量的评估至关重要. 现有算子测试方法主要针对 x86 架构, 难以刻画不同计算复杂度对 RISC-V 架构下受限内存、功耗与系统资源使用行为的影响差异. 为此, 提出 RIVdoo, 一种面向 RISC-V 架构的深度学习算子质量评估方法. RIVdoo 通过基于算子输入空间复杂度的分组策略系统性地覆盖不同计算负载, 结合多维度指标评估精度、执行效率、内存占用及系统开销, 并引入复杂度放大系数的差分测试机制, 有效识别性能异常及架构适配问题. 在覆盖计算密集型、内存密集型和轻量型的47个算子的实验中, RIVdoo揭示了不同算子库和优化策略在 RISC-V 架构下呈现出的显著性能权衡与适配差异: TFLite以1.5–2倍内存开销换取30%–50%速度提升的策略在资源受限场景下面临内存瓶颈; TVM的动态存储调度因RISC-V有限的TLB和缓存容量导致缺页率比TFLite高60%–150%; RVV向量化在部分算子和低复杂度场景下因软件模拟和启动开销导致性能劣化, 说明现有优化策略缺乏对RISC-V平台特性的针对性设计. 实验结果表明, 不同算子实现和优化策略在 RISC-V 架构下的运行行为具有明显的复杂度相关特征, 仅依赖输出正确性验证难以全面反映其真实部署表现. RIVdoo为面向 RISC-V 架构的算子适配性分析与优化提供了一种系统化的评估手段.

    Abstract:

    With the rapid development of edge computing and intelligent end-side software, the RISC-V architecture attracts increasing attention in both academia and industry due to its open-source, modular, and low-cost characteristics. However, deploying intelligent software on the RISC-V architecture presents significant challenges. The execution of intelligent software relies on deep learning operators, such as convolution, matrix multiplication, and normalization. Once defects occur in these operators, the execution efficiency, accuracy, and reliability of a large number of upper-layer intelligent applications are directly affected, making operator quality evaluation critically important. Existing operator testing methods are primarily designed for x86 architectures and have difficulty characterizing the impact of varying computational complexity on RISC-V platforms under constraints such as limited memory capacity, power consumption, and system resources. To address this issue, this study proposes RIVdoo, a deep learning operator testing method tailored for the RISC-V architecture. RIVdoo systematically covers different computational workloads through a grouping strategy based on operator input-space complexity, evaluates accuracy, execution efficiency, memory usage, and system overhead using multidimensional metrics, and introduces a differential testing mechanism with complexity amplification factors to effectively identify performance anomalies and architectural adaptation issues. Experiments covering 47 operators across compute-intensive, memory-intensive, and lightweight categories demonstrate that RIVdoo reveals significant performance trade-offs and adaptation differences among existing operator libraries and optimization strategies on the RISC-V architecture. Specifically, TFLite trades 1.5×–2× memory overhead for 30%–50% performance improvement, which leads to memory bottlenecks in resource-constrained scenarios; TVM’s dynamic storage scheduling incurs 60%–150% higher page fault rates than TFLite due to the limited TLB and cache capacity of RISC-V; RVV vectorization causes performance degradation for certain operators and low-complexity workloads because of software emulation and startup overhead, indicating that existing optimization strategies lack targeted design for RISC-V platform characteristics. The results demonstrate that the runtime behavior of different operator implementations and optimization strategies on the RIVdoo architecture exhibits strong complexity-dependent characteristics, and that output correctness alone is insufficient to reflect real deployment performance. RISC-V provides a systematic evaluation methodology for operator adaptability analysis and optimization on RISC-V platforms.

    参考文献
    相似文献
    引证文献
引用本文

刘佳玮,高岩,张犬俊,尚也,房春荣,陈振宇.面向RISC-V架构的深度学习算子测试.软件学报,2026,37(6):2390-2410

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-09-08
  • 最后修改日期:2025-10-20
  • 录用日期:
  • 在线发布日期: 2025-12-26
  • 出版日期: 2026-06-06
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号