Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ jobs:
- name: Install dependencies
run: |
python3 -m pip install -r requirements.txt
- name: Download performance data
uses: actions/download-artifact@v4
with:
name: perf-stat
- name: Extract performance data
run: |
mkdir -p build/perf_stat_dir
unzip -o perf-stat.zip -d .
- name: CMake configure
run: |
cmake -S . -B build -DUSE_SCOREBOARD=ON
Expand Down
16 changes: 12 additions & 4 deletions scoreboard/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

task_types = ["all", "mpi", "omp", "seq", "stl", "tbb"]

tasks_dir = Path("tasks")
script_dir = Path(__file__).parent
tasks_dir = script_dir.parent / "tasks"

directories = defaultdict(dict)

Expand Down Expand Up @@ -46,7 +47,7 @@


perf_stat_file_path = (
Path(__file__).parent.parent / "build" / "perf_stat_dir" / "task_run_perf_table.csv"
script_dir.parent / "build" / "perf_stat_dir" / "task_run_perf_table.csv"
)

# Read and parse performance statistics CSV
Expand Down Expand Up @@ -93,12 +94,14 @@

perf_val = perf_stats.get(dir, {}).get(task_type, "?")

# Calculate efficiency if performance data is available
# Calculate acceleration and efficiency if performance data is available
acceleration = "?"
efficiency = "?"
try:
perf_float = float(perf_val)
if perf_float > 0:
speedup = 1.0 / perf_float
acceleration = f"{speedup:.2f}"
efficiency = f"{speedup / eff_num_proc * 100:.2f}"
except (ValueError, TypeError):
pass
Expand All @@ -114,7 +117,11 @@
"log",
"-1",
"--format=%ct",
str(tasks_dir / (dir + ("_disabled" if status == "disabled" else "")) / task_type),
str(
tasks_dir
/ (dir + ("_disabled" if status == "disabled" else ""))
/ task_type
),
]
result = subprocess.run(git_cmd, capture_output=True, text=True)
if result.stdout.strip().isdigit():
Expand All @@ -130,6 +137,7 @@
"solution_points": sol_points,
"solution_style": solution_style,
"perf": perf_val,
"acceleration": acceleration,
"efficiency": efficiency,
"deadline_points": deadline_points,
"plagiarised": is_cheated,
Expand Down
2 changes: 1 addition & 1 deletion scoreboard/templates/index.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<td>{{ row.task }}</td>
{% for cell in row.types %}
<td style="text-align: center{% if cell.solution_style %};{{ cell.solution_style }}{% endif %}">{{ cell.solution_points }}</td>
<td style="text-align: center;background-color: lavender;">{{ cell.perf }}</td>
<td style="text-align: center;background-color: lavender;">{{ cell.acceleration }}</td>
<td style="text-align: center;background-color: lavender;">{{ cell.efficiency }}</td>
<td style="text-align: center;">{{ cell.deadline_points }}</td>
<td style="text-align: center{% if cell.plagiarised %}; background-color: pink{% endif %}">{{ cell.plagiarism_points }}</td>
Expand Down
Loading