首页 > 编程知识 正文

dmips flops,dmips什么意思

时间:2023-05-05 10:48:39 阅读:268478 作者:4103

1. 什么是DMIPS?

DMIPS:Dhrystone Million Instructions executed Per Second :主要用于测整数计算能力。

2.什么是FLOPS?

FLOPS:Floating-point Operations per Second:主要用于测浮点计算能力。

3. 怎么评测DMIPS? 3.1 用Dhrystone可以实测DMIP

参考1: https://wiki.cdot.senecacollege.ca/wiki/Dhrystone_howto

注:我是ubuntu系统,修改Makefile:

TIME_FUNC= -DTIME # Use times(2) for measurement OPTIMIZE= -O3

如果想在嵌入式平台跑,需要设置交叉编译环境,修改GCC为指定平台的GCC:

GCC=/opt/toolchains/linux-toolchain-aarch64/笑点低的魔镜/aarch64-linux-gnu-gcc

参考2:https://www.zhihu.com/question/311816940/answer/715901367

3.2 通过公式计算DMIPS

一般芯片都有DMIPS/MHZ信息,比如arm cortex-a53, 为2.3DMIPS/MHZ, 则四核A53,1.5ghz的总DMIPS为:

4*1.5*1000mhz*2.3 DMIPS/MHZ //参考:https://blog.csdn.net/ywcpig/article/details/80340607//参考:https://www.zhihu.com/question/37202806/answer/81965320 4 怎么计算FLOPS?

对于intel cpu, 计算方法为:

GFlops = (CPU speed in GHz) x (number of CPU cores) x (CPU instruction per cycle) x (number of CPUs per node).//参考:https://stackoverflow.com/questions/6289745/how-to-compute-the-theoretical-peak-performance-of-cpu//参考:https://blog.csdn.net/cloudeagle_bupt/article/details/8840589

这里关键在于:

CPU instruction per cycle

intel的CPU每个型号都可以查到该信息。

而对于ARM的cpu,我暂时还不知道怎么计算FLOPS,需要实测。

5. DMIPS和FLOPS的关系

一个表示整数运算能力,一个表示浮点数运算能力,二者不能完全等同。CPU性能评估采用综合测试程序,较流行的有Whetstone 和 Dhrystone 两种。Dhrystone主要用于测整数计算能力,计算单位就是DMIPS。采用Whetstone 主要用于测浮点计算能力,计算单位就是MFLOPS。
参考:https://blog.csdn.net/u011776903/article/details/79606980

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。