Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Add CI workflow to run compute-benchmarks on incoming syclos PRs #14454

Open
wants to merge 165 commits into
base: sycl
Choose a base branch
from

Conversation

ianayl
Copy link
Contributor

@ianayl ianayl commented Jul 4, 2024

This PR:

  • adds a "benchmark" mode to sycl-linux-run-tests.yml, which benchmarks a given SYCL branch/build using compute-benchmarks
    • stores benchmark results in a git repo, and
    • aggregates benchmark results in order to produce a median, which is used to pass or fail the benchmark workflow

The current plan is to enable this benchmark to run nightly in order to catch regressions, although there is potential for this workflow to be used in precommit. As a result, a lot of components in this workflow are either separate reusable components, or directly written with precommit in mind. The current benchmarking workflow functions as so:

  1. An "aggregate" workflow is ran, which aggregates historic benchmark results in the aforementioned git repo, and produces a historical median
    • This calls upon aggregate.py to handle the actual compute heavy-lifting
  2. The core benchmarking workflow is ran:
    • This calls upon benchmark.sh, which handles the logic for building and running compute-benchmarks
    • Then, compare.py is called upon for the actual comparing of benchmark data against the historical median generated prior

The workflows are fully configurable via benchmark-ci.conf; enabled compute-benchmarks tests can be configured via enabled_tests.conf.

Feel free to test out the workflow via manual dispatches of sycl-linux-run-tests.yml on branch benchmarking-workflow, but be aware that the run currently will always fail, as Github repository secrets are not yet added.

@ianayl ianayl requested a review from a team as a code owner July 4, 2024 15:54
@ianayl ianayl temporarily deployed to WindowsCILock July 4, 2024 15:54 — with GitHub Actions Inactive
@ianayl ianayl marked this pull request as draft July 4, 2024 15:54
@ianayl ianayl temporarily deployed to WindowsCILock July 4, 2024 15:54 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 4, 2024 19:08 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 4, 2024 19:35 — with GitHub Actions Inactive
@ianayl ianayl changed the title [CI][SYCL] Add PoC CI workflow to run sycl-bench micro-benchmarking suite [CI][SYCL][Do not merge] Add CI workflow to run compute-benchmarks on incoming syclos PRs Sep 6, 2024
@ianayl ianayl marked this pull request as ready for review February 4, 2025 17:45
@ianayl
Copy link
Contributor Author

ianayl commented Feb 4, 2025

@uditagarwal97 @aelovikov-intel Mind if I ask for another review? Thanks in advance!
Latest run is here: https://github.com/intel/llvm/actions/runs/13140739081.

.github/workflows/sycl-nightly.yml Outdated Show resolved Hide resolved
.github/workflows/sycl-nightly.yml Outdated Show resolved Hide resolved
shell: bash
run: |
# DO NOT use inputs.lookback_days directly, only use SANITIZED_TIMESTAMP.
SANITIZED_LOOKBACK_DAYS="$(echo '${{ inputs.lookback_days }}' | grep -o "^[0-9]$")"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we prohibit >= 10 days?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, why isn't type: number enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably is, but I've learned that github in itself is a vulnerability (e.g. failure to scrub secrets, injections via branch names); This doesn't seem too extreme, and I'd rather not rely on github if it's convenient.

find ./llvm-ci-perf-results -mindepth 3 -maxdepth 3 -type d ! -path '*.git*' |
while read -r dir; do
test_name="$(basename "$dir")"
python ./devops/scripts/benchmarking/aggregate.py ./devops "$test_name" "$dir" "$SANITIZED_TIMESTAMP"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we calculate it here instead of making it part of the results repo calculated on each upload?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point; I think there was a discussion long time ago, and the conclusion was that all code should be stored in this repo, although I forget why this was done. Let me address this at the next meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants