|
13 | 13 |
|
14 | 14 | task_types = ["all", "mpi", "omp", "seq", "stl", "tbb"] |
15 | 15 |
|
16 | | -tasks_dir = Path("tasks") |
| 16 | +script_dir = Path(__file__).parent |
| 17 | +tasks_dir = script_dir.parent / "tasks" |
17 | 18 |
|
18 | 19 | directories = defaultdict(dict) |
19 | 20 |
|
|
46 | 47 |
|
47 | 48 |
|
48 | 49 | perf_stat_file_path = ( |
49 | | - Path(__file__).parent.parent / "build" / "perf_stat_dir" / "task_run_perf_table.csv" |
| 50 | + script_dir.parent / "build" / "perf_stat_dir" / "task_run_perf_table.csv" |
50 | 51 | ) |
51 | 52 |
|
52 | 53 | # Read and parse performance statistics CSV |
|
93 | 94 |
|
94 | 95 | perf_val = perf_stats.get(dir, {}).get(task_type, "?") |
95 | 96 |
|
96 | | - # Calculate efficiency if performance data is available |
| 97 | + # Calculate acceleration and efficiency if performance data is available |
| 98 | + acceleration = "?" |
97 | 99 | efficiency = "?" |
98 | 100 | try: |
99 | 101 | perf_float = float(perf_val) |
100 | 102 | if perf_float > 0: |
101 | 103 | speedup = 1.0 / perf_float |
| 104 | + acceleration = f"{speedup:.2f}" |
102 | 105 | efficiency = f"{speedup / eff_num_proc * 100:.2f}" |
103 | 106 | except (ValueError, TypeError): |
104 | 107 | pass |
|
114 | 117 | "log", |
115 | 118 | "-1", |
116 | 119 | "--format=%ct", |
117 | | - str(tasks_dir / (dir + ("_disabled" if status == "disabled" else "")) / task_type), |
| 120 | + str( |
| 121 | + tasks_dir |
| 122 | + / (dir + ("_disabled" if status == "disabled" else "")) |
| 123 | + / task_type |
| 124 | + ), |
118 | 125 | ] |
119 | 126 | result = subprocess.run(git_cmd, capture_output=True, text=True) |
120 | 127 | if result.stdout.strip().isdigit(): |
|
130 | 137 | "solution_points": sol_points, |
131 | 138 | "solution_style": solution_style, |
132 | 139 | "perf": perf_val, |
| 140 | + "acceleration": acceleration, |
133 | 141 | "efficiency": efficiency, |
134 | 142 | "deadline_points": deadline_points, |
135 | 143 | "plagiarised": is_cheated, |
|
0 commit comments