|
57 | 57 | # "INST": 0.25,
|
58 | 58 | # }
|
59 | 59 |
|
60 |
| -FPT_FLAVOR = "L4L3andL2L1" |
| 60 | +FPT_FLAVOR = "L4L3_L2L1" |
61 | 61 |
|
62 | 62 | detailed_stats_base = {
|
63 | 63 | "bench": "",
|
@@ -233,7 +233,7 @@ def get_page_walk_latency_fpt(pgwk_str: str, freq, stats) -> float:
|
233 | 233 |
|
234 | 234 |
|
235 | 235 | # cur_latency += LATENCY[accesses[0]] + LATENCY[accesses[2]] + LATENCY[accesses[3]]
|
236 |
| - if FPT_FLAVOR == "L4L3andL2L1": |
| 236 | + if FPT_FLAVOR == "L4L3_L2L1": |
237 | 237 | step1 = 0
|
238 | 238 | step2 = 0
|
239 | 239 | if accesses[1] == "ZERO" or accesses[2] == "PWC":
|
@@ -480,6 +480,27 @@ def scp_from_remote(host, remote_path, local_path):
|
480 | 480 | except Exception as e:
|
481 | 481 | print(f"An unexpected error occurred: {e}")
|
482 | 482 |
|
| 483 | +def process_one_file_ipc_single(input_name, arch, flavor, output_name): |
| 484 | + lines = readAllLines(input_name) |
| 485 | + stats = detailed_stats_base.copy() |
| 486 | + |
| 487 | + for line in lines: |
| 488 | + parseOneLine(line, stats, arch) |
| 489 | + |
| 490 | + stats["kernel_inst"], stats["user_inst"] = get_inst_num(file_name) |
| 491 | + |
| 492 | + post_parsing_process(stats) |
| 493 | + |
| 494 | + # stats["flavor"] = args.flavor |
| 495 | + stats["path"] = file_name |
| 496 | + stats["bench"] = file_name |
| 497 | + |
| 498 | + df = pd.DataFrame([stats]) |
| 499 | + df.insert(0, 'arch', [arch]) |
| 500 | + df.insert(1, 'flavor', [flavor]) |
| 501 | + |
| 502 | + with open(output_name, 'w') as f: |
| 503 | + df.to_csv(f, index=False) |
483 | 504 |
|
484 | 505 | def process_one_file_ipc(bench, machine, path, arch):
|
485 | 506 |
|
@@ -838,11 +859,33 @@ def save_all_files_into_csv(all_files, out_dest):
|
838 | 859 | import argparse
|
839 | 860 | parser = argparse.ArgumentParser()
|
840 | 861 | parser.add_argument('--flavor', help='description for option1')
|
| 862 | + parser.add_argument('--single', help='add this to get single result, no comparation') |
| 863 | + parser.add_argument('--arch') |
| 864 | + parser.add_argument('--out') |
| 865 | + # parser.add_argument('--') |
841 | 866 | args = parser.parse_args()
|
842 | 867 |
|
843 | 868 | if args.flavor is not None:
|
844 | 869 | FPT_FLAVOR = args.flavor
|
845 | 870 |
|
| 871 | + if args.single is not None: |
| 872 | + if args.arch is None or args.out is None: |
| 873 | + assert(False) |
| 874 | + |
| 875 | + if args.arch == "fpt" and args.flavor is None: |
| 876 | + assert(False) |
| 877 | + |
| 878 | + arch = args.arch |
| 879 | + output_name = args.out |
| 880 | + file_name = args.single |
| 881 | + |
| 882 | + process_one_file_ipc_single(file_name, arch, args.flavor, output_name) |
| 883 | + |
| 884 | + print(f'Statistics: {os.path.realpath(output_name)}') |
| 885 | + |
| 886 | + import sys |
| 887 | + sys.exit(0) |
| 888 | + |
846 | 889 | radix_running, ecpt_running, running_out_file = calc_running_ipc()
|
847 | 890 | radix_loading_end, ecpt_loading_end, loading_end_out_file = calc_loading_end_ipc()
|
848 | 891 |
|
|
0 commit comments