-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathres.py
43 lines (36 loc) · 934 Bytes
/
res.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
A = [
[2*2*1800, 0.23728, 0.24013],
[2*2*3000, 1.01422, 1.10324],
[2*2*4000, 2.40164, 2.65984],
[2*2*5000, 4.63161, 5.22482]
]
B = [
[2*3*1000, 0.142529 ,0.137929],
[2*3*1400, 0.359969 ,0.381582],
[2*3*2000, 1.01358 ,1.10388] ,
[2*3*3000, 3.35734 ,3.80636]
]
C = [
[3*2*1000, 0.15086 , 0.138023],
[3*2*1400, 0.379403, 0.381449],
[3*2*2000, 1.05585 , 1.10334 ],
[3*2*3000, 3.36945 , 3.81213 ]
]
D =[
[3*3*500, 0.080534, 0.058123],
[3*3*1000, 0.46753, 0.466141],
[3*3*1400, 1.19739, 1.29059] ,
[3*3*2000, 3.37338, 3.80907] ,
[3*3*2500, 6.61647, 7.45527]
]
As = ['2x2','2x3', '3x2', '3x3' ]
def OPS(N): return 2*N**3
def FPS(N,T) :
return OPS(N)/T/1000**4
count =-1
for q in [ A,B,C,D]:
count +=1
for a in q:
print(
"%s %5d %1.3f vs GEMM %1.3f " % (As[count],a[0],FPS(a[0],a[1]),FPS(a[0],a[2]))
)