FLOPs(Floating Point Operations)
FLOPS(Floating-point operations per second)
TOPS(Tera/Trillion Operations Per Second)
MACS( Multiply-Accumulate Instructions per Second)
TOPS/W
ResNet-50 inference throughput(images/s)
ResNet-50 inference energy efficiency(images/s/W)
Throughput/TOPS
DMIPS(Dhrystone Million Instructions executed Per Second)
FLOPs(Floating Point Operations)
注意s小写,是floating point operations的缩写(s表复数),意指浮点运算数,理解为计算量, 可以用来衡量算法/模型的复杂度。一般的,算法/模型复杂度OPs,可以理解成OPs/frame,再乘上帧率就可以得到大概需要的算力,算力一般用FLOPS(对浮点运算)/TOPS(对整数运算)。

FLOPS(Floating-point operations per second)
每秒浮点运算次数, 是每秒所执行的浮点运算次数的简称,被用来评估电脑效能。1 MFLOPS表示每秒100万个数字运算(“浮点”的加法或乘法)。1 GFLOPS表示每秒10亿次的浮点运算,即1000 MFLOPS。1 TFLOPS表示每秒1万亿次浮点运算,或1000 GFLOPS,即100万MFLOPS或每秒10^12^次操作。通常还需指定运算精度,可选FP32,FP16,BF16,TF32等,如FP32: 10TFLOPS,或者10 TFLOPS(FP32)。
TOPS(Tera/Trillion Operations Per Second)
1 TOPS代表处理器每秒钟可进行一万亿次(10^12^)整数乘法或者加法操作,衡量计算性能。一般针对整数运算用OPS,浮点数用FLOPS,整数运算还需要指定运算精度,一般有INT4,INT8,INT16,INT32。如Nvdia AGX Orin 标称254 TOPS(INT8)或者INT8: 254TOPS。
NVDLA(Deep Learning Accelerator)与GPU的区别:
- DLA是NVIDIA推出的用于专做视觉的部件,如Xavier上有两个DLA。
- DLA的定位是专做常用计算(Conv+激活函数+Pooling+Normalization+Reshape),然后复杂的计算交给Volta GPU做。
- DLA功耗很低,性能更好。
DLA has up to 5 TOPS INT8 or 2.5 TFLOPS FP16 performance with a power consumption of only 0.5-1.5W. The DLAs support accelerating CNN layers such as convolution, deconvolution, activation functions, min/max/mean pooling, local response normalization, and fully-connected layers.
一般标称FLOPS/TOPS是一个峰值性能(peak value),条件比较理想,是针对特定时钟频率,特定功耗,特定kernel大小,的的性能, 可以作为参考,但是实际应用中不太可能达到峰值。最高TOPS还跟吞吐,带宽,并行处理,输入数据加载速度,功耗等相关。
下面是一个Nvidia A100的datasheet,可以看到TFLOPS针对的是FP64/FP32/TF32,TOPS针对的是INT8/INT4。

MACS( Multiply-Accumulate Instructions per Second)
MAC是乘法累加器,MAC与上面的OPS的关系:1MAC=2OPS,因为一个MAC包含乘法和加法两种运算。Nvdia 的叫法:HMMA (Half-Precision Matrix Multiply and Accumulate) and IMMA (Integer Matrix Multiply and Accumulate) 。

TOPS/W
每瓦万亿次操作,衡量性能效率。
ResNet-50 inference throughput(images/s)
横坐标是不同的batch size,纵坐标是images/s。

ResNet-50 inference energy efficiency(images/s/W)
横坐标是不同的batch size,纵坐标是images/s/watt。
上面两个指标也可以把ResNet-50换成AlexNet,GoogLeNet,VGG19等,只是ResNet-50是比较常用的。
Throughput/TOPS
每万亿次操作吞吐,是衡量效率(efficiency)的一个指标。
DMIPS(Dhrystone Million Instructions executed Per Second)
Dhrystone是测量处理器运算能力的最常见基准(benchmark)程序之一,常用于处理器的整型运算性能的测量。Dhrystone是一种整数和字符串运算测试程序。一般用来衡量CPU算力。
由于CPU算力与主频相关,而主频是可以配置的,一般标称用:DMIPS/MHz
如:A72:4.7DMIPS/MHz =>. A72@1.6GHz = 4.7*1600 = 7520 DMIPS = 6.52 KDMIPS
参考
- Are Tera Operations Per Second (TOPS) Just hype? Or Dark AI Silicon in Disguise?
- As AI chips improve, is TOPS the best way to measure their power?
- Lies, Damn Lies, And TOPS/Watt
- Is Tesla’s Dojo As Amazing As Claimed?
- TOPS, Memory, Throughput And Inference Efficiency
- AI Inference Memory System Tradeoffs
- Not all TOPs are created equal
- How to Evaluate Deep Neural Network Processors
- Nvidia Drive
- NVIDIA A100 TENSOR CORE GPU
- AI芯片算力比较
- NVIDIA Xavier 整理
- JETSON AGX XAVIER AND THE NEW ERA OF AUTONOMOUS MACHINES
- List of ARM microarchitectures