-
Notifications
You must be signed in to change notification settings - Fork 791
[Do not merge][CI] Fetch benchmarking CI results from git instead of local #17416
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,16 +27,25 @@ runs: | |
shell: bash | ||
env: | ||
TARGET_DEVICE: ${{ inputs.target_devices }} | ||
RUNNER_NAME: ${{ runner.name }} | ||
run: | | ||
case "$RUNNER_TAG" in | ||
'["Linux", "gen12"]' | '["Linux", "pvc"]') ;; | ||
'["PVC_PERF"]' ) ;; | ||
*) | ||
echo "#" | ||
echo "# WARNING: Only gen12/pvc on Linux is fully supported." | ||
echo "# WARNING: Only specific tuned runners are fully supported." | ||
echo "# This workflow is not guaranteed to work with other runners." | ||
echo "#" ;; | ||
esac | ||
|
||
# Ensure runner name has nothing injected | ||
# TODO: in terms of security, is this overkill? | ||
if [ -z "$(printf '%s' "$RUNNER_NAME" | grep -oE '^[a-zA-Z0-9_-]+$')" ]; then | ||
echo "Bad runner name, please ensure runner name is [a-zA-Z0-9_-]." | ||
exit 1 | ||
fi | ||
echo "RUNNER_NAME=$RUNNER_NAME" >> $GITHUB_ENV | ||
|
||
# input.target_devices is not directly used, as this allows code injection | ||
case "$TARGET_DEVICE" in | ||
level_zero:*) ;; | ||
|
@@ -46,11 +55,11 @@ runs: | |
echo "# This workflow is not guaranteed to work with other backends." | ||
echo "#" ;; | ||
esac | ||
echo "ONEAPI_DEVICE_SELECTOR=$TARGET_DEVICE" >> $GITHUB_ENV | ||
|
||
- name: Compute CPU core range to run benchmarks on | ||
shell: bash | ||
run: | | ||
# Taken from ur-benchmark-reusable.yml: | ||
|
||
# Compute the core range for the first NUMA node; second node is used by | ||
# UMF. Skip the first 4 cores as the kernel is likely to schedule more | ||
# work on these. | ||
|
@@ -67,65 +76,62 @@ runs: | |
|
||
ZE_AFFINITY_MASK=0 | ||
echo "ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK" >> $GITHUB_ENV | ||
- name: Checkout results repo | ||
shell: bash | ||
run: | | ||
git clone -b unify-ci https://github.com/intel/llvm-ci-perf-results | ||
- name: Run compute-benchmarks | ||
shell: bash | ||
run: | | ||
cat << EOF | ||
# | ||
# NOTE TO DEVELOPERS: | ||
# | ||
|
||
Check latter steps of the workflow: This job produces an artifact with: | ||
- benchmark results from passing/failing tests | ||
- log containing all failing (too slow) benchmarks | ||
- log containing all erroring benchmarks | ||
|
||
While this step in the workflow provides debugging output describing this | ||
information, it might be easier to inspect the logs from the artifact | ||
instead. | ||
|
||
EOF | ||
export ONEAPI_DEVICE_SELECTOR="${{ inputs.target_devices }}" | ||
# TODO generate summary + display helpful message here | ||
export CMPLR_ROOT=./toolchain | ||
echo "-----" | ||
sycl-ls | ||
echo "-----" | ||
pip install --user --break-system-packages -r ./devops/scripts/benchmarks/requirements.txt | ||
taskset -c "$CORES" ./devops/scripts/benchmarks/main.py "$(realpath ./llvm_test_workdir)" --sycl "$(realpath ./toolchain)" --save baseline --preset Minimal | ||
echo "-----" | ||
mkdir -p "./llvm-ci-perf-results/$RUNNER_NAME" | ||
taskset -c "$CORES" ./devops/scripts/benchmarks/main.py \ | ||
"$(realpath ./llvm_test_workdir)" \ | ||
--sycl "$(realpath ./toolchain)" \ | ||
--save baseline \ | ||
--output-html remote \ | ||
--results-dir "./llvm-ci-perf-results/$RUNNER_NAME" \ | ||
--output-dir "./llvm-ci-perf-results/$RUNNER_NAME" \ | ||
--preset Minimal | ||
echo "-----" | ||
ls | ||
# - name: Push compute-benchmarks results | ||
# if: always() | ||
# shell: bash | ||
# run: | | ||
# # TODO -- waiting on security clearance | ||
# # Load configuration values | ||
# $(python ./devops/scripts/benchmarking/load_config.py ./devops constants) | ||
# | ||
# cd "./llvm-ci-perf-results" | ||
# git config user.name "SYCL Benchmarking Bot" | ||
# git config user.email "[email protected]" | ||
# git pull | ||
# git add . | ||
# # Make sure changes have been made | ||
# if git diff --quiet && git diff --cached --quiet; then | ||
# echo "No new results added, skipping push." | ||
# else | ||
# git commit -m "[GHA] Upload compute-benchmarks results from https://github.com/intel/llvm/actions/runs/${{ github.run_id }}" | ||
# git push "https://[email protected]/$SANITIZED_PERF_RES_GIT_REPO.git" "$SANITIZED_PERF_RES_GIT_BRANCH" | ||
# fi | ||
- name: Find benchmark result artifact here | ||
- name: Push compute-benchmarks results | ||
if: always() | ||
shell: bash | ||
run: | | ||
cat << EOF | ||
# | ||
# Artifact link for benchmark results here: | ||
# | ||
EOF | ||
- name: Archive compute-benchmark results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Compute-benchmark run ${{ github.run_id }} (${{ runner.name }}) | ||
path: ./artifact | ||
# TODO redo configuration | ||
# $(python ./devops/scripts/benchmarking/load_config.py ./devops constants) | ||
|
||
cd "./llvm-ci-perf-results" | ||
git config user.name "SYCL Benchmarking Bot" | ||
git config user.email "[email protected]" | ||
git pull | ||
git add . | ||
# Make sure changes have been made | ||
if git diff --quiet && git diff --cached --quiet; then | ||
echo "No new results added, skipping push." | ||
else | ||
git commit -m "[GHA] Upload compute-benchmarks results from https://github.com/intel/llvm/actions/runs/${{ github.run_id }}" | ||
git push "https://[email protected]/intel/llvm-ci-perf-results.git" unify-ci | ||
fi | ||
# - name: Find benchmark result artifact here | ||
# if: always() | ||
# shell: bash | ||
# run: | | ||
# cat << EOF | ||
# # | ||
# # Artifact link for benchmark results here: | ||
# # | ||
# EOF | ||
# - name: Archive compute-benchmark results | ||
# if: always() | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: Compute-benchmark run ${{ github.run_id }} (${{ runner.name }}) | ||
# path: ./artifact |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might fail if a different job pushed changes between this and when the repo was cloned, but we can fix that later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
Thanks for the quick review btw! Will be cherry-picking into unify-benchmark-ci