-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b7f050
commit 5266f2f
Showing
11 changed files
with
213 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import pickle | ||
import common_util | ||
from multiprocessing import Pool | ||
|
||
cmd = [ | ||
"linpack","llama" | ||
] | ||
arg = [ | ||
[],["stories15M.bin", "-z", "tokenizer.bin", "-t", "0.0"], | ||
] | ||
|
||
|
||
pool = Pool(processes=40) | ||
results = [] | ||
def run_mvvm(): | ||
global results | ||
results1 = [] | ||
for i in range(len(cmd)): | ||
for j in range(len(common_util.aot_variant)): | ||
for env in common_util.list_of_arg: | ||
aot = cmd[i] + common_util.aot_variant[j] | ||
results1.append(pool.apply_async(common_util.run_checkpoint, (aot, arg[i], env))) | ||
# print the results | ||
results += [x.get() for x in results1] | ||
|
||
|
||
def run_criu(): | ||
global results | ||
results1 = [] | ||
|
||
for i in range(len(cmd)): | ||
aot = cmd[i] | ||
results1.append( | ||
pool.apply_async( | ||
common_util.run_criu, (aot, "linpack", arg[i], "OMP_NUM_THREADS=1") | ||
) | ||
) | ||
# print the results | ||
results += [x.get() for x in results1] | ||
|
||
|
||
def run_qemu_x86_64(): | ||
global results | ||
results1 = [] | ||
|
||
for i in range(len(cmd)): | ||
aot = cmd[i] | ||
results1.append( | ||
pool.apply_async( | ||
common_util.run_qemu_x86_64, (aot, "linpack", arg[i], "OMP_NUM_THREADS=1") | ||
) | ||
) | ||
# print the results | ||
results += [x.get() for x in results1] | ||
|
||
|
||
run_criu() | ||
run_qemu_x86_64() | ||
|
||
# print the results | ||
|
||
run_qemu_x86_64() | ||
run_criu() | ||
with open("bench_migration_results.pickle", "wb") as f: | ||
pickle.dump(results, f) | ||
for exec, output in results: | ||
print(exec) | ||
lines = output.split("\n") | ||
for line in lines: | ||
if ( | ||
line.__contains__("Execution time:") | ||
or line.__contains__("real") | ||
or line.__contains__("user") | ||
): | ||
print(line) | ||
|
||
# read the results | ||
with open("bench_migration_results.pickle", "rb") as f: | ||
results = pickle.load(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule wasm-micro-runtime
updated
9 files
Oops, something went wrong.