diff --git a/.github/workflows/t3000-model-perf-tests-impl.yaml b/.github/workflows/t3000-model-perf-tests-impl.yaml index f6e7e2b62d8..f03f5fac6a8 100644 --- a/.github/workflows/t3000-model-perf-tests-impl.yaml +++ b/.github/workflows/t3000-model-perf-tests-impl.yaml @@ -42,7 +42,7 @@ jobs: uses: actions/download-artifact@v4 with: name: TTMetal_build_${{ matrix.test-group.arch }}_profiler - - name: Download regular build artifact + - name: Download build artifact if: ${{ !matrix.test-group.tracy }} uses: actions/download-artifact@v4 with: @@ -65,9 +65,21 @@ jobs: if: ${{ !cancelled() }} run: | ls -hal - export PERF_REPORT_FILENAME="Models_Perf_$(date +%Y_%m_%d).csv" - ls -hal $PERF_REPORT_FILENAME - echo "perf_report_filename=$PERF_REPORT_FILENAME" >> "$GITHUB_OUTPUT" + TODAY=$(date +%Y_%m_%d) + PERF_REPORT_FILENAME_MODELS="Models_Perf_${TODAY}.csv" + PERF_REPORT_FILENAME_CCL="CCL_Perf_${TODAY}.csv" + if [ -f "$PERF_REPORT_FILENAME_MODELS" ]; then + echo "Found Models Perf report: $PERF_REPORT_FILENAME_MODELS" + echo "perf_report_filename=$PERF_REPORT_FILENAME_MODELS" >> "$GITHUB_OUTPUT" + ls -hal "$PERF_REPORT_FILENAME_MODELS" + elif [ -f "$PERF_REPORT_FILENAME_CCL" ]; then + echo "Found CCL Perf report: $PERF_REPORT_FILENAME_CCL" + echo "perf_report_filename=$PERF_REPORT_FILENAME_CCL" >> "$GITHUB_OUTPUT" + ls -hal "$PERF_REPORT_FILENAME_CCL" + else + echo "No perf report found." + exit 1 + fi - name: Upload perf report if: ${{ !cancelled() && steps.check-perf-report.conclusion == 'success' }} uses: actions/upload-artifact@v4 diff --git a/tests/ttnn/unit_tests/operations/ccl/perf/perf_csv.py b/tests/ttnn/unit_tests/operations/ccl/perf/perf_csv.py index 53b234dcb5d..4ca721b3cbf 100644 --- a/tests/ttnn/unit_tests/operations/ccl/perf/perf_csv.py +++ b/tests/ttnn/unit_tests/operations/ccl/perf/perf_csv.py @@ -5,6 +5,7 @@ import pandas as pd import os import re +import time def perf_report(file_path): @@ -208,10 +209,12 @@ def calculate_bandwidth(row): averages_df = pd.DataFrame(averages_data) - averages_file_path = file_path.replace(".csv", "_averages.csv") + today = time.strftime("%Y_%m_%d") + ccl_perf_file_path = f"CCL_Perf_{today}.csv" + os.rename(file_path, ccl_perf_file_path) - averages_df.to_csv(averages_file_path, index=False) + averages_df.to_csv(ccl_perf_file_path, index=False) - print(f"Averages CSV saved to: {averages_file_path}") + print(f"CCL Perf report CSV saved to: {ccl_perf_file_path}") return averages_df