一种针对稠密块矩阵的稀疏矩阵向量乘方法及装置

By preprocessing and partitioning the dense block matrix on the MT-3000 processor, and combining the dma_p2p and dma_sg methods, the problems of memory access latency and low parallelism in the dense block matrix SpMV algorithm are solved, and efficient sparse matrix vector multiplication is achieved.

CN116954731BActive Publication Date: 2026-07-17NAT UNIV OF DEFENSE TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NAT UNIV OF DEFENSE TECH
Filing Date
2023-07-31
Publication Date
2026-07-17

Smart Images

  • Figure CN116954731B_ABST
    Figure CN116954731B_ABST
Patent Text Reader

Abstract

本发明公开了一种针对稠密块矩阵的稀疏矩阵向量乘方法及装置,该方法包括:读取矩阵A的mtx文件和向量X,将mtx文件和向量X加载到DDR内存中,对矩阵A进行预处理得到以SELL格式存储的矩阵A;利用dma_p2p方法将向量X从DDR内存加载到处理器的全局共享内存GSM上;根据执行的DSP核数对所述稠密块矩阵A进行横向划分为多个行块;利用DSP核对行块和向量X并行进行相乘运算,每个DSP核处理一个行块,得到对应的稠密块矩阵向量乘结果。本发明借助稠密块矩阵结构特性,对处于稠密块同一列的非零元所对应的向量X元素,只搬移一次到AM里面,然后再复制多份,可以有效的降低访存和传输开销,显著的提升了稠密块矩阵向量乘的性能。
Need to check novelty before this filing date? Find Prior Art