Spaces:
Runtime error
Runtime error
Commit
·
e95954d
1
Parent(s):
a2d6b9a
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,9 +71,7 @@ def mlp_exec(bs, h, n, d):
|
|
| 71 |
return flop, nbytes, exec_time
|
| 72 |
|
| 73 |
def print_kernel_execution(c1, c2, comp_flop, mem_bytes):
|
| 74 |
-
arith_int = comp_flop/mem_bytes
|
| 75 |
exec_time = calc_exec_time(comp_flop, mem_bytes)
|
| 76 |
-
|
| 77 |
comp_flop = round(comp_flop/1e9, 2)
|
| 78 |
mem_bytes = round(mem_bytes/1e6, 2)
|
| 79 |
|
|
@@ -108,7 +106,7 @@ mqa_total_time = 0.
|
|
| 108 |
mha_total_time = 0.
|
| 109 |
|
| 110 |
for i in range(n_start, n):
|
| 111 |
-
shared_time = out_exec(bs, h, i, d)[2] + softmax_exec(bs, h, i , d)[2] + 2*ln_exec(bs, h, i, d)[2] \
|
| 112 |
+ 2*mlp_exec(bs, h, i, d)[2] + 3*ln_exec(bs, h, i, d)
|
| 113 |
mha_time = shared_time + qkv_mha_exec(bs, h, i, d)[2] + att1_mha_exec(bs, h, i, d)[2] + att2_mha_exec(bs, h, i, d)[2]
|
| 114 |
mha_total_time += l*mha_time
|
|
|
|
| 71 |
return flop, nbytes, exec_time
|
| 72 |
|
| 73 |
def print_kernel_execution(c1, c2, comp_flop, mem_bytes):
|
|
|
|
| 74 |
exec_time = calc_exec_time(comp_flop, mem_bytes)
|
|
|
|
| 75 |
comp_flop = round(comp_flop/1e9, 2)
|
| 76 |
mem_bytes = round(mem_bytes/1e6, 2)
|
| 77 |
|
|
|
|
| 106 |
mha_total_time = 0.
|
| 107 |
|
| 108 |
for i in range(n_start, n):
|
| 109 |
+
shared_time = out_exec(bs, h, i, d)[2] + softmax_exec(bs, h, i , d)[2] + 2*ln_exec(bs, h, i, d)[2] \
|
| 110 |
+ 2*mlp_exec(bs, h, i, d)[2] + 3*ln_exec(bs, h, i, d)
|
| 111 |
mha_time = shared_time + qkv_mha_exec(bs, h, i, d)[2] + att1_mha_exec(bs, h, i, d)[2] + att2_mha_exec(bs, h, i, d)[2]
|
| 112 |
mha_total_time += l*mha_time
|