面向RISC-V向量算法库的自动化测试方法
CSTR:
作者:
作者单位:

军事科学院国防科技创新研究院

作者简介:

通讯作者:

中图分类号:

基金项目:


Automated Testing for RISC-V Vector Algorithm Libraries
Author:
Affiliation:

National Innovation Institute of Defense Technology, Academy of Military Sciences

Fund Project:

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

    RISC-V因其精简、开源、可定制的特点受到学术界和工业界的广泛关注,围绕RISC-V的软件生态也在逐步完善。2021年9月,RISC-V委员会发布了1.0版本的向量指令集规范(RVV),为面向RISC-V的数据级并行优化提供了标准,且部分算法库(如OpenCV)已有面向RVV的移植工作。算法库的开发移植是基于明确的函数原型和语义规范,通常将具有基础(标量)版本的代码实现作为参考,开发的向量版本算法需要符合规范以保证算法库的兼容性。本文提出了一种面向RVV算法库的自动化测试方法,通过对算法函数原型进行解析生成符合规范的测试数据,将向量算法库的测试结果与参考实现对比分析给出测试结论,从而实现算法库的自动化测试。与传统的自动化测试框架相比,本方法无需手动编写测试用例,也无需提供待测目标的设计规范。实验表明,本方法可快速、有效地对RVV算法库进行测试。

    Abstract:

    RISC-V has received widespread attention from the academic and industrial communities due to its characteristics of simplicity, open source, and customization.The software ecosystem surrounding RISC-V is gradually being perfected.In September 2021, the RISC-V Committee released version 1.0 of the RISC-V Vector Extension(RVV), which provides standard for optimizing data-level parallelism for RISC-V and some algorithm libraries(such as OpenCV)have already started the RVV-oriented porting work.The development and porting of algorithm libraries are based on clear function prototypes and semantic specifications, usually with implementations of the base(scalar)version as reference, and the development of vector version algorithms must conform to specifications to ensure compatibility.In light of this, this research proposed an automated testing technology for RVV algorithm libraries, which generates test data that conforms to the specifications by parsing the function prototypes, analyzes and compares the test results of the vector algorithm library with the reference implementation to provide test conclusions, and achieves automation testing of the algorithm library.Compared with traditional automation testing frameworks, the method proposed can save the work from manually writing test cases and provide design specifications for the target under test.The experiments show that this method can effectively test RVV algorithm libraries.

    参考文献
    相似文献
    引证文献
引用本文
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2023-08-29
  • 最后修改日期:2023-09-08
  • 录用日期:
  • 在线发布日期: 2024-01-15
  • 出版日期:
文章二维码