Kratos Benchmark
收藏资源简介:
Kratos Benchmark是由康奈尔大学开发的一个专注于FPGA上展开式DNN(深度神经网络)的基准测试套件。该数据集包含8个内核,主要用于评估和优化卷积和通用矩阵乘法(GEMM)层在不同级别稀疏性和数值精度下的性能。数据集通过系统级Verilog代码实现,支持商业和学术CAD流程,旨在通过高稀疏性和低比特宽度实现显著的面积减少,从而推动新型可编程架构的发展,特别是在稀疏和低精度DNN加速领域。
Kratos Benchmark is a benchmark suite focused on unfolded Deep Neural Networks (DNNs) on Field-Programmable Gate Arrays (FPGAs), developed by Cornell University. This suite comprises 8 kernels, which are primarily utilized to evaluate and optimize the performance of convolutional and General Matrix Multiplication (GEMM) layers under varying levels of sparsity and numerical precision. Implemented using system-level Verilog code, it supports both commercial and academic Computer-Aided Design (CAD) flows. The suite aims to achieve substantial area reduction through high sparsity and low bit-width, thereby advancing the development of novel programmable architectures, especially in the field of sparse and low-precision DNN acceleration.
Kratos FPGA 基准测试数据集
代码结构
- 文件夹
conv_1d、conv_2d、gemms、gemmt包含相应基准测试的 SystemVerilog 代码,包括模块和包装生成脚本。 flow_general.py包含QuartusRunner和VTRRunner两个类,用于自动运行基准测试集。
内核表
- 内核表信息以图片形式展示,文件名为
kernel_table.png。
使用方法
- 使用
sample.py作为示例:- 导入
flow_general.py以获取必要的工具。 - 创建一个字典来指定内核的参数。
- 使用内核模块和参数创建一个
VTRRunner对象。 - 使用
run方法运行内核,并使用get_result方法获取结果。 - 运行器将在当前目录中创建一个文件夹来存储生成的文件和结果。运行过程的标准输出和标准错误将被捕获并存储在文件夹中。
- 导入
python from flow_general import *
settings = { data_width: 8, row_num: 8, col_num: 8, length: 8, sparsity: 0.5, }
q = VTRRunner(flow_gemmt_fu_util, settings) q.run() q.wait() print(q.get_result())
- 更多高级用法,请阅读
flow_general.py中的注释和代码。

- 1Kratos: An FPGA Benchmark for Unrolled DNNs with Fine-Grained Sparsity and Mixed Precision康奈尔大学 · 2024年



