From 5192b85828456d56c61f4010333f974cce3741bb Mon Sep 17 00:00:00 2001 From: Vadim Musin Date: Mon, 21 Oct 2024 16:46:01 +0200 Subject: [PATCH] check-inductor-report.py --- .github/workflows/e2e-reusable.yml | 3 ++- scripts/check_inductor_report.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-reusable.yml b/.github/workflows/e2e-reusable.yml index 04dc52c252..b2b1491861 100644 --- a/.github/workflows/e2e-reusable.yml +++ b/.github/workflows/e2e-reusable.yml @@ -238,7 +238,8 @@ jobs: --dtype=${{ inputs.dtype }} \ --mode=${{ inputs.mode }} \ --test_mode=${{ inputs.test_mode }} \ - --device=xpu + --device=xpu \ + --workspace="${GITHUB_WORKSPACE}" fi else bash -e $GITHUB_WORKSPACE/scripts/inductor_xpu_test.sh ${{ inputs.suite }} ${{ inputs.dtype }} ${{ inputs.mode }} ${{ inputs.test_mode }} xpu 0 static 1 0 diff --git a/scripts/check_inductor_report.py b/scripts/check_inductor_report.py index a2904c5385..9bfb877c73 100755 --- a/scripts/check_inductor_report.py +++ b/scripts/check_inductor_report.py @@ -5,8 +5,8 @@ import sys -def check_report(suite, dtype, mode, test_mode, device, models_file): - inductor_log_dir = Path("torch_compile_debug") / suite / dtype +def check_report(suite, dtype, mode, test_mode, device, models_file, workspace): + inductor_log_dir = Path(workspace) / Path("inductor_log") / suite / dtype inductor_report_filename = f"inductor_{suite}_{dtype}_{mode}_{device}_{test_mode}.csv" inductor_report_path = Path(inductor_log_dir / inductor_report_filename) @@ -57,6 +57,7 @@ def main(): argparser.add_argument("--test_mode", required=True, choices=("performance", "accuracy")) argparser.add_argument("--device", help="i.e. xpu", required=True) argparser.add_argument("--models-file", help="Subset of models list", required=True) + argparser.add_argument("--workspace", help="Where to find the 'inductor_log' directory", default='.'), args = argparser.parse_args() exitcode = check_report(args.suite, args.dtype, args.mode, args.test_mode, args.device, args.models_file) print(f"Report check result: {'SUCCESS' if exitcode == 0 else 'FAIL'}")