From 52a61796ab1357bd8f8ca0b6a9514a43e794a962 Mon Sep 17 00:00:00 2001 From: malmahrouqi3 Date: Fri, 20 Jun 2025 14:59:52 -0400 Subject: [PATCH 1/5] fixed bench statements --- toolchain/mfc/bench.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/toolchain/mfc/bench.py b/toolchain/mfc/bench.py index 0eb28d8e30..f071687602 100644 --- a/toolchain/mfc/bench.py +++ b/toolchain/mfc/bench.py @@ -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: @@ -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.98) - 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) From 5add2abfdb2a1ba398e5fc1000dc83297a0e53d4 Mon Sep 17 00:00:00 2001 From: malmahrouqi3 Date: Fri, 20 Jun 2025 15:02:10 -0400 Subject: [PATCH 2/5] fixed typo --- toolchain/mfc/bench.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/mfc/bench.py b/toolchain/mfc/bench.py index f071687602..eb1b120035 100644 --- a/toolchain/mfc/bench.py +++ b/toolchain/mfc/bench.py @@ -138,7 +138,7 @@ 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: - cons.print(f"[bold red]Error[/bold red]: 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 _: pass From 441a683b8c144843523572111bf73ddb362a0029 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Fri, 20 Jun 2025 21:05:51 -0400 Subject: [PATCH 3/5] Update bench.yml --- .github/workflows/bench.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 10e8e51681..ca014b9139 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -1,6 +1,6 @@ name: 'Benchmark' -on: pull_request +on: workflow_dispatch jobs: file-changes: @@ -25,6 +25,7 @@ jobs: strategy: matrix: device: ['cpu', 'gpu'] + fail-fast: false runs-on: group: phoenix labels: gt From 8d99f720e5d1fff0127f3640cc4b2ea1494adf7f Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Fri, 20 Jun 2025 21:16:14 -0400 Subject: [PATCH 4/5] Update bench.yml --- .github/workflows/bench.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index ca014b9139..b2b96359c5 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -1,6 +1,9 @@ name: 'Benchmark' -on: workflow_dispatch +on: + pull_request_review: + types: [submitted] + workflow_dispatch: jobs: file-changes: @@ -20,7 +23,7 @@ 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: From 170cbe6df1d2d0b50ae974b1dd3f770e5b1184fc Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sat, 21 Jun 2025 10:30:58 -0400 Subject: [PATCH 5/5] Update bench.yml --- .github/workflows/bench.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index b2b96359c5..f4404ff65f 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -60,6 +60,12 @@ jobs: (cd pr && . ./mfc.sh load -c p -m g) (cd pr && ./mfc.sh bench_diff ../master/bench-${{ matrix.device }}.yaml ../pr/bench-${{ matrix.device }}.yaml) + - name: Print Logs + if: always() + run: | + cat pr/bench-${{ matrix.device }}.* 2>/dev/null || true + cat master/bench-${{ matrix.device }}.* 2>/dev/null || true + - name: Archive Logs uses: actions/upload-artifact@v4 if: always()