edgeai-modelzoo icon indicating copy to clipboard operation
edgeai-modelzoo copied to clipboard

GigaMACs = 2 FLOPs ,so GigaMACs 33.591* 4 is right?

Open zyxcambridge opened this issue 2 years ago • 8 comments

PointPillars Fast Depth 496x432 33.591

MACs=K × K × C i n × C o u t × H o u t × W o u t K × K × C_{in} ×C_{out} × H_{out} × W_{out}K×K×C in ​ ×C out ​ ×H out ​ ×W out ​

———————————————— 版权声明:本文为CSDN博主「拒绝省略号」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/qq_49030008/article/details/120271268

FLOPS(Floating Point Operations Per Second):每秒浮点运算次数,是一个衡量硬件速度的指标,  
   
FLOPs(Floating Point Operations):浮点运算次数  
   
   
MACs(Multiply–Accumulate Operations):乘加累积操作数,  
   
   
   
MADDs、MACCs(multiply-accumulate operations(s表复数))  

zyxcambridge avatar Sep 28 '22 03:09 zyxcambridge

https://link.zhihu.com/?target=https%3A//github.com/Lyken17/pytorch-OpCounter

zyxcambridge avatar Sep 28 '22 03:09 zyxcambridge

Which model is this about?

mathmanu avatar Sep 28 '22 04:09 mathmanu

There is some mistake in documentation, 33.591 is the msec spent on TI TDA4x Deep Learning Processor. Will update the right GMAC number soon.

poddar414 avatar Sep 28 '22 05:09 poddar414

I checked the data again, there is minor correction in GMAC number and it is 33.44 which will get pushed soon in the repo.

1 MAC= 2 FLOPs. Hence 33.44 GMAC = 2*33.44 Giga FLOPS.

regards Deepak Poddar

poddar414 avatar Sep 28 '22 10:09 poddar414

Correcting some terminologies:

1 MAC = 2 Flops

Also Flop in this context means Floating point operations (No per second).

mathmanu avatar Sep 28 '22 16:09 mathmanu

i get the poitpillars FLOPs 64 G ,not 33.44 ,include ConvTranspose2d

33.44 not include ConvTranspose2d ?

zyxcambridge avatar Sep 30 '22 07:09 zyxcambridge

layer_type weight k weight c weight h weight w input c input h input w ouput c ouput h ouput w stride padding FLOPs conv1 64 64 3 3 64 496 432 64 248 216 2 0 1974730752 conv2 64 64 3 3 64 248 216 64 248 216 1 1 1974730752 conv3 64 64 3 3 64 248 216 64 248 216 1 1 1974730752 conv4 64 64 3 3 64 248 216 64 248 216 1 1 1974730752 ConvTranspose2d 128 64 1 1 64 248 216 128 248 216 1 0 438829056 0 conv5 128 64 3 3 64 248 216 128 124 108 2 0 987365376 conv6 128 128 3 3 128 124 108 128 124 108 1 1 1974730752 conv7 128 128 3 3 128 124 108 128 124 108 1 1 1974730752 conv8 128 128 3 3 128 124 108 128 124 108 1 1 1974730752 conv9 128 128 3 3 128 124 108 128 124 108 1 1 1974730752 conv10 128 128 3 3 128 124 108 128 124 108 1 1 1974730752 ConvTranspose2d 128 128 2 2 128 124 108 128 248 216 1 0 3510632448 0 conv11 256 128 3 3 128 124 108 256 62 54 2 0 987365376 conv12 256 256 3 3 256 62 54 256 62 54 1 1 1974730752 conv13 256 256 3 3 256 62 54 256 62 54 1 1 1974730752 conv14 256 256 3 3 256 62 54 256 62 54 1 1 1974730752 conv15 256 256 3 3 256 62 54 256 62 54 1 1 1974730752 conv16 256 256 3 3 256 62 54 256 62 54 1 1 1974730752 ConvTranspose2d 256 128 4 4 256 62 54 128 248 216 2 0 28085059584 concat 384 248 216 0

											SUM	61655482368

zyxcambridge avatar Sep 30 '22 07:09 zyxcambridge

we don't use ConvTranspose2d as it was used in original model. We use upsample layer instead. Please refer the config https://github.com/TexasInstruments/edgeai-mmdetection3d/blob/master/configs/pointpillars/tidl_hv_pointpillars_secfpn_6x8_160e_kitti-3d-car.py

This repository has been forked from original one, and tuned for TI Deep Learning accelerator.

Only one draw back of using upsample layer is its undeterminstic nature in training, otherwise no loss in accuracy is observed because of this.

poddar414 avatar Oct 03 '22 11:10 poddar414