Skip to content

CreeperLin/RASP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RASP

Runtime Analyzer and Statistical Profiler

Usage

Get your model

import rasp
from torchvision.models import AlexNet
model = AlexNet()

For basic stats

rasp.stat(model, input_shape=(1, 3, 224, 224))

For runtime stats

rasp.stat(model, input_shape=(1, 3, 224, 224), timing=True)

Specify device

rasp.stat(model, input_shape=(1, 3, 224, 224), device='cuda', timing=True)

For memory usage (CUDA)

rasp.stat(model, input_shape=(1, 3, 224, 224), device='cuda', memory=True)

Use MACC instead of FLOPs

rasp.stat(model, input_shape=(1, 3, 224, 224), includes=['macc'], excludes=['flops'])

Export DataFrame

df = rasp.stat(model, input_shape=(1, 3, 224, 224), device='cuda', timing=True, print_stat=False, returns='data')

Customize profiling parameters

rasp.CFG.profile.num_batches=200
rasp.CFG.profile.warmup_batches=20
rasp.stat(model, input_shape=(1, 3, 224, 224), timing=True)

Use your own input

inputs = torch.randn(8, 3, 224, 224)
rasp.stat(model, inputs=inputs, timing=True)

Set different report type

for report_type in ['tape', 'node', 'leaves', 'root', None]:
    rasp.stat(model, input_shape=(1, 3, 224, 224), report_type=report_type, timing=True)

Save report

rasp.stat(model, input_shape=(1, 3, 224, 224), timing=True, save_path='./reports')

Addons

Energy Cost

(speculative)

import rasp
import rasp.addons.energy
rasp.stat(model, input_shape=(1, 3, 224, 224), includes=['energy'])

Results

MobileNetV2 using cuda with input_shape=(1, 3, 224, 224)

index name type in_shape out_shape params flops mem_r mem_w mem_rw macc net_dev_mem dev_mem_alloc dev_max_mem_alloc
0 .features.0.0 Conv2d (1, 3, 224, 224) (1, 32, 112, 112) 864 21274624 605568 1605632 2211200 10838016 0 1605632 1605632
1 .features.0.1 BatchNorm2d (1, 32, 112, 112) (1, 32, 112, 112) 64 1605632 1605888 1605632 3211520 802816 1605632 1605632 3211264
2 .features.0.2 ReLU6 (1, 32, 112, 112) (1, 32, 112, 112) 0 401408 1605632 1605632 3211264 401408 1605632 0 1605632
3 .features.1.conv.0.0 Conv2d (1, 32, 112, 112) (1, 32, 112, 112) 288 6823936 1606784 1605632 3212416 3612672 1605632 1605632 3211264
4 .features.1.conv.0.1 BatchNorm2d (1, 32, 112, 112) (1, 32, 112, 112) 64 1605632 1605888 1605632 3211520 802816 3211264 1605632 4816896
5 .features.1.conv.0.2 ReLU6 (1, 32, 112, 112) (1, 32, 112, 112) 0 401408 1605632 1605632 3211264 401408 3211264 0 3211264
6 .features.1.conv.1 Conv2d (1, 32, 112, 112) (1, 16, 112, 112) 512 12644352 1607680 802816 2410496 6422528 3211264 802816 4014080
7 .features.1.conv.2 BatchNorm2d (1, 16, 112, 112) (1, 16, 112, 112) 32 802816 802944 802816 1605760 401408 2408448 802816 3211264
8 .features.2.conv.0.0 Conv2d (1, 16, 112, 112) (1, 96, 112, 112) 1536 37330944 808960 4816896 5625856 19267584 802816 4816896 5619712
9 .features.2.conv.0.1 BatchNorm2d (1, 96, 112, 112) (1, 96, 112, 112) 192 4816896 4817664 4816896 9634560 2408448 5619712 4816896 10436608
10 .features.2.conv.0.2 ReLU6 (1, 96, 112, 112) (1, 96, 112, 112) 0 1204224 4816896 4816896 9633792 1204224 5619712 0 5619712
11 .features.2.conv.1.0 Conv2d (1, 96, 112, 112) (1, 96, 56, 56) 864 5117952 4820352 1204224 6024576 2709504 5619712 1204224 6823936
12 .features.2.conv.1.1 BatchNorm2d (1, 96, 56, 56) (1, 96, 56, 56) 192 1204224 1204992 1204224 2409216 602112 6823936 2146304 8970240
13 .features.2.conv.1.2 ReLU6 (1, 96, 56, 56) (1, 96, 56, 56) 0 301056 1204224 1204224 2408448 301056 7766016 0 7766016
14 .features.2.conv.2 Conv2d (1, 96, 56, 56) (1, 24, 56, 56) 2304 14375424 1213440 301056 1514496 7225344 2949120 301056 3250176
15 .features.2.conv.3 BatchNorm2d (1, 24, 56, 56) (1, 24, 56, 56) 48 301056 301248 301056 602304 150528 1103872 301056 1404928
16 .features.3.conv.0.0 Conv2d (1, 24, 56, 56) (1, 144, 56, 56) 3456 21224448 314880 1806336 2121216 10838016 301056 1806336 2107392
17 .features.3.conv.0.1 BatchNorm2d (1, 144, 56, 56) (1, 144, 56, 56) 288 1806336 1807488 1806336 3613824 903168 2107392 1806336 3913728
18 .features.3.conv.0.2 ReLU6 (1, 144, 56, 56) (1, 144, 56, 56) 0 451584 1806336 1806336 3612672 451584 2107392 0 2107392
19 .features.3.conv.1.0 Conv2d (1, 144, 56, 56) (1, 144, 56, 56) 1296 7676928 1811520 1806336 3617856 4064256 2107392 1806336 3913728
20 .features.3.conv.1.1 BatchNorm2d (1, 144, 56, 56) (1, 144, 56, 56) 288 1806336 1807488 1806336 3613824 903168 3913728 1806336 5720064
21 .features.3.conv.1.2 ReLU6 (1, 144, 56, 56) (1, 144, 56, 56) 0 451584 1806336 1806336 3612672 451584 3913728 0 3913728
22 .features.3.conv.2 Conv2d (1, 144, 56, 56) (1, 24, 56, 56) 3456 21600768 1820160 301056 2121216 10838016 2107392 301056 2408448
23 .features.3.conv.3 BatchNorm2d (1, 24, 56, 56) (1, 24, 56, 56) 48 301056 301248 301056 602304 150528 602112 301056 903168
24 .features.4.conv.0.0 Conv2d (1, 24, 56, 56) (1, 144, 56, 56) 3456 21224448 314880 1806336 2121216 10838016 301056 1806336 2107392
25 .features.4.conv.0.1 BatchNorm2d (1, 144, 56, 56) (1, 144, 56, 56) 288 1806336 1807488 1806336 3613824 903168 2107392 1806336 3913728
26 .features.4.conv.0.2 ReLU6 (1, 144, 56, 56) (1, 144, 56, 56) 0 451584 1806336 1806336 3612672 451584 2107392 0 2107392
27 .features.4.conv.1.0 Conv2d (1, 144, 56, 56) (1, 144, 28, 28) 1296 1919232 1811520 451584 2263104 1016064 2107392 451584 2558976
28 .features.4.conv.1.1 BatchNorm2d (1, 144, 28, 28) (1, 144, 28, 28) 288 451584 452736 451584 904320 225792 2558976 451584 3010560
29 .features.4.conv.1.2 ReLU6 (1, 144, 28, 28) (1, 144, 28, 28) 0 112896 451584 451584 903168 112896 2558976 0 2558976
30 .features.4.conv.2 Conv2d (1, 144, 28, 28) (1, 32, 28, 28) 4608 7200256 470016 100352 570368 3612672 752640 100352 852992
31 .features.4.conv.3 BatchNorm2d (1, 32, 28, 28) (1, 32, 28, 28) 64 100352 100608 100352 200960 50176 401408 100352 501760
32 .features.5.conv.0.0 Conv2d (1, 32, 28, 28) (1, 192, 28, 28) 6144 9483264 124928 602112 727040 4816896 100352 602112 702464
33 .features.5.conv.0.1 BatchNorm2d (1, 192, 28, 28) (1, 192, 28, 28) 384 602112 603648 602112 1205760 301056 702464 602112 1304576
34 .features.5.conv.0.2 ReLU6 (1, 192, 28, 28) (1, 192, 28, 28) 0 150528 602112 602112 1204224 150528 702464 0 702464
35 .features.5.conv.1.0 Conv2d (1, 192, 28, 28) (1, 192, 28, 28) 1728 2558976 609024 602112 1211136 1354752 702464 602112 1304576
36 .features.5.conv.1.1 BatchNorm2d (1, 192, 28, 28) (1, 192, 28, 28) 384 602112 603648 602112 1205760 301056 1304576 602112 1906688
37 .features.5.conv.1.2 ReLU6 (1, 192, 28, 28) (1, 192, 28, 28) 0 150528 602112 602112 1204224 150528 1304576 0 1304576
38 .features.5.conv.2 Conv2d (1, 192, 28, 28) (1, 32, 28, 28) 6144 9608704 626688 100352 727040 4816896 702464 100352 802816
39 .features.5.conv.3 BatchNorm2d (1, 32, 28, 28) (1, 32, 28, 28) 64 100352 100608 100352 200960 50176 200704 100352 301056
40 .features.6.conv.0.0 Conv2d (1, 32, 28, 28) (1, 192, 28, 28) 6144 9483264 124928 602112 727040 4816896 100352 602112 702464
41 .features.6.conv.0.1 BatchNorm2d (1, 192, 28, 28) (1, 192, 28, 28) 384 602112 603648 602112 1205760 301056 702464 602112 1304576
42 .features.6.conv.0.2 ReLU6 (1, 192, 28, 28) (1, 192, 28, 28) 0 150528 602112 602112 1204224 150528 702464 0 702464
43 .features.6.conv.1.0 Conv2d (1, 192, 28, 28) (1, 192, 28, 28) 1728 2558976 609024 602112 1211136 1354752 702464 602112 1304576
44 .features.6.conv.1.1 BatchNorm2d (1, 192, 28, 28) (1, 192, 28, 28) 384 602112 603648 602112 1205760 301056 1304576 602112 1906688
45 .features.6.conv.1.2 ReLU6 (1, 192, 28, 28) (1, 192, 28, 28) 0 150528 602112 602112 1204224 150528 1304576 0 1304576
46 .features.6.conv.2 Conv2d (1, 192, 28, 28) (1, 32, 28, 28) 6144 9608704 626688 100352 727040 4816896 702464 100352 802816
47 .features.6.conv.3 BatchNorm2d (1, 32, 28, 28) (1, 32, 28, 28) 64 100352 100608 100352 200960 50176 200704 100352 301056
48 .features.7.conv.0.0 Conv2d (1, 32, 28, 28) (1, 192, 28, 28) 6144 9483264 124928 602112 727040 4816896 100352 602112 702464
49 .features.7.conv.0.1 BatchNorm2d (1, 192, 28, 28) (1, 192, 28, 28) 384 602112 603648 602112 1205760 301056 702464 602112 1304576
50 .features.7.conv.0.2 ReLU6 (1, 192, 28, 28) (1, 192, 28, 28) 0 150528 602112 602112 1204224 150528 702464 0 702464
51 .features.7.conv.1.0 Conv2d (1, 192, 28, 28) (1, 192, 14, 14) 1728 639744 609024 150528 759552 338688 702464 150528 852992
52 .features.7.conv.1.1 BatchNorm2d (1, 192, 14, 14) (1, 192, 14, 14) 384 150528 152064 150528 302592 75264 852992 150528 1003520
53 .features.7.conv.1.2 ReLU6 (1, 192, 14, 14) (1, 192, 14, 14) 0 37632 150528 150528 301056 37632 852992 0 852992
54 .features.7.conv.2 Conv2d (1, 192, 14, 14) (1, 64, 14, 14) 12288 4804352 199680 50176 249856 2408448 250880 50176 301056
55 .features.7.conv.3 BatchNorm2d (1, 64, 14, 14) (1, 64, 14, 14) 128 50176 50688 50176 100864 25088 150528 50176 200704
56 .features.8.conv.0.0 Conv2d (1, 64, 14, 14) (1, 384, 14, 14) 24576 9558528 148480 301056 449536 4816896 50176 301056 351232
57 .features.8.conv.0.1 BatchNorm2d (1, 384, 14, 14) (1, 384, 14, 14) 768 301056 304128 301056 605184 150528 351232 301056 652288
58 .features.8.conv.0.2 ReLU6 (1, 384, 14, 14) (1, 384, 14, 14) 0 75264 301056 301056 602112 75264 351232 0 351232
59 .features.8.conv.1.0 Conv2d (1, 384, 14, 14) (1, 384, 14, 14) 3456 1279488 314880 301056 615936 677376 351232 301056 652288
60 .features.8.conv.1.1 BatchNorm2d (1, 384, 14, 14) (1, 384, 14, 14) 768 301056 304128 301056 605184 150528 652288 301056 953344
61 .features.8.conv.1.2 ReLU6 (1, 384, 14, 14) (1, 384, 14, 14) 0 75264 301056 301056 602112 75264 652288 0 652288
62 .features.8.conv.2 Conv2d (1, 384, 14, 14) (1, 64, 14, 14) 24576 9621248 399360 50176 449536 4816896 351232 50176 401408
63 .features.8.conv.3 BatchNorm2d (1, 64, 14, 14) (1, 64, 14, 14) 128 50176 50688 50176 100864 25088 100352 50176 150528
64 .features.9.conv.0.0 Conv2d (1, 64, 14, 14) (1, 384, 14, 14) 24576 9558528 148480 301056 449536 4816896 50176 301056 351232
65 .features.9.conv.0.1 BatchNorm2d (1, 384, 14, 14) (1, 384, 14, 14) 768 301056 304128 301056 605184 150528 351232 301056 652288
66 .features.9.conv.0.2 ReLU6 (1, 384, 14, 14) (1, 384, 14, 14) 0 75264 301056 301056 602112 75264 351232 0 351232
67 .features.9.conv.1.0 Conv2d (1, 384, 14, 14) (1, 384, 14, 14) 3456 1279488 314880 301056 615936 677376 351232 301056 652288
68 .features.9.conv.1.1 BatchNorm2d (1, 384, 14, 14) (1, 384, 14, 14) 768 301056 304128 301056 605184 150528 652288 301056 953344
69 .features.9.conv.1.2 ReLU6 (1, 384, 14, 14) (1, 384, 14, 14) 0 75264 301056 301056 602112 75264 652288 0 652288
70 .features.9.conv.2 Conv2d (1, 384, 14, 14) (1, 64, 14, 14) 24576 9621248 399360 50176 449536 4816896 351232 50176 401408
71 .features.9.conv.3 BatchNorm2d (1, 64, 14, 14) (1, 64, 14, 14) 128 50176 50688 50176 100864 25088 100352 50176 150528
72 .features.10.conv.0.0 Conv2d (1, 64, 14, 14) (1, 384, 14, 14) 24576 9558528 148480 301056 449536 4816896 50176 301056 351232
73 .features.10.conv.0.1 BatchNorm2d (1, 384, 14, 14) (1, 384, 14, 14) 768 301056 304128 301056 605184 150528 351232 301056 652288
74 .features.10.conv.0.2 ReLU6 (1, 384, 14, 14) (1, 384, 14, 14) 0 75264 301056 301056 602112 75264 351232 0 351232
75 .features.10.conv.1.0 Conv2d (1, 384, 14, 14) (1, 384, 14, 14) 3456 1279488 314880 301056 615936 677376 351232 301056 652288
76 .features.10.conv.1.1 BatchNorm2d (1, 384, 14, 14) (1, 384, 14, 14) 768 301056 304128 301056 605184 150528 652288 301056 953344
77 .features.10.conv.1.2 ReLU6 (1, 384, 14, 14) (1, 384, 14, 14) 0 75264 301056 301056 602112 75264 652288 0 652288
78 .features.10.conv.2 Conv2d (1, 384, 14, 14) (1, 64, 14, 14) 24576 9621248 399360 50176 449536 4816896 351232 50176 401408
79 .features.10.conv.3 BatchNorm2d (1, 64, 14, 14) (1, 64, 14, 14) 128 50176 50688 50176 100864 25088 100352 50176 150528
80 .features.11.conv.0.0 Conv2d (1, 64, 14, 14) (1, 384, 14, 14) 24576 9558528 148480 301056 449536 4816896 50176 301056 351232
81 .features.11.conv.0.1 BatchNorm2d (1, 384, 14, 14) (1, 384, 14, 14) 768 301056 304128 301056 605184 150528 351232 301056 652288
82 .features.11.conv.0.2 ReLU6 (1, 384, 14, 14) (1, 384, 14, 14) 0 75264 301056 301056 602112 75264 351232 0 351232
83 .features.11.conv.1.0 Conv2d (1, 384, 14, 14) (1, 384, 14, 14) 3456 1279488 314880 301056 615936 677376 351232 301056 652288
84 .features.11.conv.1.1 BatchNorm2d (1, 384, 14, 14) (1, 384, 14, 14) 768 301056 304128 301056 605184 150528 652288 301056 953344
85 .features.11.conv.1.2 ReLU6 (1, 384, 14, 14) (1, 384, 14, 14) 0 75264 301056 301056 602112 75264 652288 0 652288
86 .features.11.conv.2 Conv2d (1, 384, 14, 14) (1, 96, 14, 14) 36864 14431872 448512 75264 523776 7225344 351232 75264 426496
87 .features.11.conv.3 BatchNorm2d (1, 96, 14, 14) (1, 96, 14, 14) 192 75264 76032 75264 151296 37632 125440 75264 200704
88 .features.12.conv.0.0 Conv2d (1, 96, 14, 14) (1, 576, 14, 14) 55296 21563136 296448 451584 748032 10838016 75264 451584 526848
89 .features.12.conv.0.1 BatchNorm2d (1, 576, 14, 14) (1, 576, 14, 14) 1152 451584 456192 451584 907776 225792 526848 451584 978432
90 .features.12.conv.0.2 ReLU6 (1, 576, 14, 14) (1, 576, 14, 14) 0 112896 451584 451584 903168 112896 526848 0 526848
91 .features.12.conv.1.0 Conv2d (1, 576, 14, 14) (1, 576, 14, 14) 5184 1919232 472320 451584 923904 1016064 526848 451584 978432
92 .features.12.conv.1.1 BatchNorm2d (1, 576, 14, 14) (1, 576, 14, 14) 1152 451584 456192 451584 907776 225792 978432 451584 1430016
93 .features.12.conv.1.2 ReLU6 (1, 576, 14, 14) (1, 576, 14, 14) 0 112896 451584 451584 903168 112896 978432 0 978432
94 .features.12.conv.2 Conv2d (1, 576, 14, 14) (1, 96, 14, 14) 55296 21657216 672768 75264 748032 10838016 526848 75264 602112
95 .features.12.conv.3 BatchNorm2d (1, 96, 14, 14) (1, 96, 14, 14) 192 75264 76032 75264 151296 37632 150528 75264 225792
96 .features.13.conv.0.0 Conv2d (1, 96, 14, 14) (1, 576, 14, 14) 55296 21563136 296448 451584 748032 10838016 75264 451584 526848
97 .features.13.conv.0.1 BatchNorm2d (1, 576, 14, 14) (1, 576, 14, 14) 1152 451584 456192 451584 907776 225792 526848 451584 978432
98 .features.13.conv.0.2 ReLU6 (1, 576, 14, 14) (1, 576, 14, 14) 0 112896 451584 451584 903168 112896 526848 0 526848
99 .features.13.conv.1.0 Conv2d (1, 576, 14, 14) (1, 576, 14, 14) 5184 1919232 472320 451584 923904 1016064 526848 451584 978432
100 .features.13.conv.1.1 BatchNorm2d (1, 576, 14, 14) (1, 576, 14, 14) 1152 451584 456192 451584 907776 225792 978432 451584 1430016
101 .features.13.conv.1.2 ReLU6 (1, 576, 14, 14) (1, 576, 14, 14) 0 112896 451584 451584 903168 112896 978432 0 978432
102 .features.13.conv.2 Conv2d (1, 576, 14, 14) (1, 96, 14, 14) 55296 21657216 672768 75264 748032 10838016 526848 75264 602112
103 .features.13.conv.3 BatchNorm2d (1, 96, 14, 14) (1, 96, 14, 14) 192 75264 76032 75264 151296 37632 150528 75264 225792
104 .features.14.conv.0.0 Conv2d (1, 96, 14, 14) (1, 576, 14, 14) 55296 21563136 296448 451584 748032 10838016 75264 451584 526848
105 .features.14.conv.0.1 BatchNorm2d (1, 576, 14, 14) (1, 576, 14, 14) 1152 451584 456192 451584 907776 225792 526848 451584 978432
106 .features.14.conv.0.2 ReLU6 (1, 576, 14, 14) (1, 576, 14, 14) 0 112896 451584 451584 903168 112896 526848 0 526848
107 .features.14.conv.1.0 Conv2d (1, 576, 14, 14) (1, 576, 7, 7) 5184 479808 472320 112896 585216 254016 526848 113152 640000
108 .features.14.conv.1.1 BatchNorm2d (1, 576, 7, 7) (1, 576, 7, 7) 1152 112896 117504 112896 230400 56448 640000 113152 753152
109 .features.14.conv.1.2 ReLU6 (1, 576, 7, 7) (1, 576, 7, 7) 0 28224 112896 112896 225792 28224 640000 0 640000
110 .features.14.conv.2 Conv2d (1, 576, 7, 7) (1, 160, 7, 7) 92160 9023840 481536 31360 512896 4515840 188416 31744 220160
111 .features.14.conv.3 BatchNorm2d (1, 160, 7, 7) (1, 160, 7, 7) 320 31360 32640 31360 64000 15680 107008 31744 138752
112 .features.15.conv.0.0 Conv2d (1, 160, 7, 7) (1, 960, 7, 7) 153600 15005760 645760 188160 833920 7526400 31744 188416 220160
113 .features.15.conv.0.1 BatchNorm2d (1, 960, 7, 7) (1, 960, 7, 7) 1920 188160 195840 188160 384000 94080 220160 188416 408576
114 .features.15.conv.0.2 ReLU6 (1, 960, 7, 7) (1, 960, 7, 7) 0 47040 188160 188160 376320 47040 220160 0 220160
115 .features.15.conv.1.0 Conv2d (1, 960, 7, 7) (1, 960, 7, 7) 8640 799680 222720 188160 410880 423360 220160 188416 408576
116 .features.15.conv.1.1 BatchNorm2d (1, 960, 7, 7) (1, 960, 7, 7) 1920 188160 195840 188160 384000 94080 408576 188416 596992
117 .features.15.conv.1.2 ReLU6 (1, 960, 7, 7) (1, 960, 7, 7) 0 47040 188160 188160 376320 47040 408576 0 408576
118 .features.15.conv.2 Conv2d (1, 960, 7, 7) (1, 160, 7, 7) 153600 15044960 802560 31360 833920 7526400 220160 31744 251904
119 .features.15.conv.3 BatchNorm2d (1, 160, 7, 7) (1, 160, 7, 7) 320 31360 32640 31360 64000 15680 63488 31744 95232
120 .features.16.conv.0.0 Conv2d (1, 160, 7, 7) (1, 960, 7, 7) 153600 15005760 645760 188160 833920 7526400 31744 188416 220160
121 .features.16.conv.0.1 BatchNorm2d (1, 960, 7, 7) (1, 960, 7, 7) 1920 188160 195840 188160 384000 94080 220160 188416 408576
122 .features.16.conv.0.2 ReLU6 (1, 960, 7, 7) (1, 960, 7, 7) 0 47040 188160 188160 376320 47040 220160 0 220160
123 .features.16.conv.1.0 Conv2d (1, 960, 7, 7) (1, 960, 7, 7) 8640 799680 222720 188160 410880 423360 220160 188416 408576
124 .features.16.conv.1.1 BatchNorm2d (1, 960, 7, 7) (1, 960, 7, 7) 1920 188160 195840 188160 384000 94080 408576 188416 596992
125 .features.16.conv.1.2 ReLU6 (1, 960, 7, 7) (1, 960, 7, 7) 0 47040 188160 188160 376320 47040 408576 0 408576
126 .features.16.conv.2 Conv2d (1, 960, 7, 7) (1, 160, 7, 7) 153600 15044960 802560 31360 833920 7526400 220160 31744 251904
127 .features.16.conv.3 BatchNorm2d (1, 160, 7, 7) (1, 160, 7, 7) 320 31360 32640 31360 64000 15680 63488 31744 95232
128 .features.17.conv.0.0 Conv2d (1, 160, 7, 7) (1, 960, 7, 7) 153600 15005760 645760 188160 833920 7526400 31744 188416 220160
129 .features.17.conv.0.1 BatchNorm2d (1, 960, 7, 7) (1, 960, 7, 7) 1920 188160 195840 188160 384000 94080 220160 188416 408576
130 .features.17.conv.0.2 ReLU6 (1, 960, 7, 7) (1, 960, 7, 7) 0 47040 188160 188160 376320 47040 220160 0 220160
131 .features.17.conv.1.0 Conv2d (1, 960, 7, 7) (1, 960, 7, 7) 8640 799680 222720 188160 410880 423360 220160 188416 408576
132 .features.17.conv.1.1 BatchNorm2d (1, 960, 7, 7) (1, 960, 7, 7) 1920 188160 195840 188160 384000 94080 408576 188416 596992
133 .features.17.conv.1.2 ReLU6 (1, 960, 7, 7) (1, 960, 7, 7) 0 47040 188160 188160 376320 47040 408576 0 408576
134 .features.17.conv.2 Conv2d (1, 960, 7, 7) (1, 320, 7, 7) 307200 30089920 1416960 62720 1479680 15052800 220160 62976 283136
135 .features.17.conv.3 BatchNorm2d (1, 320, 7, 7) (1, 320, 7, 7) 640 62720 65280 62720 128000 31360 94720 62976 157696
136 .features.18.0 Conv2d (1, 320, 7, 7) (1, 1280, 7, 7) 409600 40078080 1701120 250880 1952000 20070400 62976 250880 313856
137 .features.18.1 BatchNorm2d (1, 1280, 7, 7) (1, 1280, 7, 7) 2560 250880 261120 250880 512000 125440 313856 250880 564736
138 .features.18.2 ReLU6 (1, 1280, 7, 7) (1, 1280, 7, 7) 0 62720 250880 250880 501760 62720 313856 0 313856
139 .classifier.0 Dropout (1, 1280) (1, 1280) 0 0 0 0 0 0 5120 0 5120
140 .classifier.1 Linear (1, 1280) (1, 1000) 1281000 2560000 5129120 4000 5133120 1281000 5120 4096 9216

torchvision models measured on x86 CPU with input_shape=(1, 3, 224, 224)

Model Params FLOPs Energy (pJ) Latency (ms) FLOPS
alexnet 61.1M 715.51M 11.59G 51.28 13.95G
densenet121 7.98M 2.91G 25.53G 236.69 12.28G
densenet161 28.68M 7.87G 60.26G 465.83 16.89G
densenet169 14.15M 3.45G 31.04G 267.22 12.91G
densenet201 20.01M 4.41G 39.96G 325.93 13.53G
googlenet 6.62M 1.51G 10.15G 138.81 10.89G
mnasnet0_5 2.22M 141.15M 3.94G 125.75 1.12G
mnasnet0_75 3.17M 240.27M 5.29G 176.01 1.37G
mnasnet1_0 4.38M 335.93M 6.25G 217.23 1.55G
mnasnet1_3 6.28M 528.32M 8.29G 286.33 1.85G
mobilenet_v2 3.5M 327.14M 7.09G 181.15 1.81G
resnet101 44.55M 7.92G 54.08G 321.71 24.63G
resnet152 60.19M 11.66G 77.98G 455.6 25.59G
resnet18 11.69M 1.84G 11.85G 104.73 17.59G
resnet34 21.8M 3.7G 22.53G 173.6 21.29G
resnet50 25.56M 4.19G 30.73G 196.17 21.36G
resnext101_32x8d 88.79M 16.58G 110.75G 702.24 23.61G
resnext50_32x4d 25.03M 4.32G 33.84G 235.09 18.37G
shufflenet_v2_x0_5 1.37M 44.62M 1.19G 41.67 1.07G
shufflenet_v2_x1_0 2.28M 152.54M 2.47G 74.02 2.06G
shufflenet_v2_x1_5 3.5M 306.46M 3.92G 104.28 2.94G
shufflenet_v2_x2_0 7.39M 597.64M 6.46G 142.92 4.18G
squeezenet1_0 1.25M 826.09M 6.39G 83.3 9.92G
squeezenet1_1 1.24M 352.76M 3.25G 47.72 7.39G
vgg11 132.86M 7.62G 56.18G 321.75 23.68G
vgg11_bn 132.87M 7.65G 58.27G 336.94 22.7G
vgg13 133.05M 11.32G 75.41G 503.35 22.49G
vgg13_bn 133.05M 11.37G 78.87G 517.65 21.97G
vgg16 138.36M 15.49G 95.54G 622.3 24.88G
vgg16_bn 138.37M 15.54G 99.36G 642.72 24.18G
vgg19 143.67M 19.65G 115.66G 739.1 26.58G
vgg19_bn 143.68M 19.71G 119.85G 752.85 26.18G
wide_resnet101_2 126.89M 22.98G 136.68G 770.79 29.82G
wide_resnet50_2 68.88M 11.6G 72.4G 430.54 26.94G

Notes

  • flops: float operations (multiplications and additions)
  • macc: multiplications followed by additions (1 macc = 2 flops)
  • FLOPS: number of flops per second
  • mem_r: theoretical memory read
  • mem_w: theoretical memory write
  • net_dev_mem: total device memory used
  • dev_mem_alloc: additional memory allocated (increased from last net_dev_mem)
  • dev_max_mem_alloc: maximum memory used from last reset

About

Runtime Analyzer and Statistical Profiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages