Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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: 6 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: 'Benchmark'

on: pull_request
on:
pull_request_review:
types: [submitted]
workflow_dispatch:

jobs:
file-changes:
Expand All @@ -20,11 +23,12 @@ jobs:

self:
name: Georgia Tech | Phoenix (NVHPC)
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true'
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true' && ${{ github.event.review.state == 'approved' }}
needs: file-changes
strategy:
matrix:
device: ['cpu', 'gpu']
fail-fast: false
runs-on:
group: phoenix
labels: gt
Expand Down
7 changes: 3 additions & 4 deletions toolchain/mfc/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def diff():
if not math.isfinite(lhs_summary[target.name]["exec"]) or not math.isfinite(rhs_summary[target.name]["exec"]):
err = 1
cons.print(f"lhs_summary or rhs_summary reports non-real exec time for {target.name} - Case: {slug}")

try:
exec_time_value = lhs_summary[target.name]["exec"] / rhs_summary[target.name]["exec"]
if exec_time_value < 0.9:
Expand All @@ -139,10 +138,10 @@ def diff():
grind_time_value = lhs_summary[target.name]["grind"] / rhs_summary[target.name]["grind"]
speedups[i] += f" & Grind: {grind_time_value:.2f}"
if grind_time_value <0.95:
raise MFCException(f"Benchmarking failed since grind time speedup for {target.name} below acceptable threshold (<0.98) - Case: {slug}")
cons.print(f"[bold red]Error[/bold red]: Benchmarking failed since grind time speedup for {target.name} below acceptable threshold (<0.95) - Case: {slug}")
err = 1
except Exception as _:
err = 1
cons.print(f"lhs_summary or rhs_summary reports non-real grind time for {target.name} - Case: {slug}")
pass

table.add_row(f"[magenta]{slug}[/magenta]", *speedups)

Expand Down
Loading