-
Notifications
You must be signed in to change notification settings - Fork 754
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
[UR][CI] add manually triggered benchmark action #17088
Conversation
ping @ianayl |
also, FYI, python code formatting failed |
f5d0218
to
2eaa1dd
Compare
This should be ready to review, but we still don't have the runner configured. |
LGTM (I can't close my issues) |
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.
The naming of this file could conform better to what's currently in .github/workflows
: how about something like ur-benchmarks-reusable.yml for now, and then it can be mulled upon 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.
We can do that. It's not just UR though.
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.
Done, renamed them to ur-benchmarks-reusable.yml
.
env: | ||
PR_NO: ${{ inputs.pr_no }} | ||
run: | | ||
git fetch -- https://github.com/${{github.repository}} +refs/pull/${PR_NO}/*:refs/remotes/origin/pr/${PR_NO}/* |
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.
git fetch -- https://github.com/${{github.repository}} +refs/pull/${PR_NO}/*:refs/remotes/origin/pr/${PR_NO}/* | |
git fetch -- https://github.com/intel/llvm "+refs/pull/${PR_NO}/*:refs/remotes/origin/pr/${PR_NO}/*" |
Two quick things:
- Shell variables being used should always be quoted to avoid code injection
- NIT: Honestly this is way paranoid, but the "best" known security practice right now is to not trust the github context, as it's been used in code injection before. I'll leave this up to your discretion though.
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.
Shell variables being used should always be quoted to avoid code injection
Fixed.
PR_NO: ${{ inputs.pr_no }} | ||
run: | | ||
git fetch -- https://github.com/${{github.repository}} +refs/pull/${PR_NO}/*:refs/remotes/origin/pr/${PR_NO}/* | ||
git checkout origin/pr/${PR_NO}/merge |
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.
git checkout origin/pr/${PR_NO}/merge | |
git checkout "origin/pr/${PR_NO}/merge" |
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.
I removed the PR_NO env var.
run: | | ||
git fetch -- https://github.com/${{github.repository}} +refs/pull/${PR_NO}/*:refs/remotes/origin/pr/${PR_NO}/* | ||
git checkout origin/pr/${PR_NO}/merge | ||
git rev-parse origin/pr/${PR_NO}/merge |
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.
git rev-parse origin/pr/${PR_NO}/merge | |
git rev-parse "origin/pr/${PR_NO}/merge" |
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.
I removed the PR_NO
env var.
${{matrix.adapter.sycl_config}} | ||
|
||
- name: Build SYCL | ||
run: cmake --build ${{github.workspace}}/sycl_build -j $(nproc) |
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.
All workloads in intel/llvm use https://github.com/intel/llvm/blob/sycl/.github/workflows/sycl-linux-build.yml for building, which produces an artifact that is then accepted by multiple different workflows in intel/llvm.
I think the goal'd be to get this workflow up as fast as possible, so for the time being this is probably fine. However, we'll want this changed to use sycl-linux-build.yml eventually.
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.
Yup, let's leave that as TODO.
run: | | ||
# Compute the core range for the first NUMA node; second node is for UMF jobs. | ||
# Skip the first 4 cores - the kernel is likely to schedule more work on these. | ||
CORES=$(lscpu | awk ' |
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.
CORES=$(lscpu | awk ' | |
CORES="$(lscpu | awk ' |
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.
Done
split(a[4], b, ",") | ||
sub(/^0/, "4", b[1]) | ||
print b[1] | ||
}') |
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.
}') | |
}')" |
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.
Done
working-directory: ${{ github.workspace }} | ||
id: benchmarks | ||
run: > | ||
taskset -c ${{ env.CORES }} ${{ github.workspace }}/sycl-repo/unified-runtime/scripts/benchmarks/main.py |
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.
taskset -c ${{ env.CORES }} ${{ github.workspace }}/sycl-repo/unified-runtime/scripts/benchmarks/main.py | |
taskset -c "${{ env.CORES }}" ${{ github.workspace }}/sycl-repo/unified-runtime/scripts/benchmarks/main.py |
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.
Done.
Unfortunately I'm not in dpcpp-devops-reviewers, so final say is with them instead. But:
|
I don't believe I have write access to intel/llvm to push the workflow on a branch here.
It's UR_DNP_INTEL_06_01 I think? I talked with @lukaszstolarczuk and he will setup a runner with |
FYI, so the new runner should be up now (it's actually called |
2eaa1dd
to
ffc93a7
Compare
ffc93a7
to
f036d58
Compare
Thanks! |
@intel/unified-runtime-reviewers @intel/dpcpp-devops-reviewers please review. This is just porting an existing workflow from UR. It's not fully conformant with how other intel/llvm workflows are written, and we plan on addressing that after a merge. Example comment is here: pbalcer#2 (comment) From what I understand, it's not possible to test |
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.
UR LGTM
f036d58
to
78807df
Compare
Correct. No, your testing should be enough. |
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.
I don't like that it still feels as if SYCL and UR are two completely different projects. Can't we unify the build here and re-use normal artifacts? Why does it have to be different from how we run SYCL E2E tests?
It's not fully conformant with how other intel/llvm workflows are written, and we plan on addressing that after a merge.
The merge has happened, hasn't it?
This is the quickest way of getting the perf testing functionality back. Right now we have no way to test performance changes in the adapters.
I was referring to a merge of this patch. |
Please fix PR descrption. |
github.rest.issues.createComment({ | ||
issue_number: pr_no, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: body | ||
}) |
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.
For future, do we want it to be a comment or a summary of this job (like, e.g., https://github.com/intel/llvm/actions/runs/13438348841)?
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.
Good question. I think a comment is more visible. Right now we do not fail a job if the scripts think there's a regression, so if the status is hidden in the job logs, people might forget to check.
In the near future we also plan on uploading a set of html charts per PR (basically this: https://oneapi-src.github.io/unified-runtime/benchmark_results.html but with a PR marked on the chart, so you can easily compare against previous nightly runs). Again, I think people are more likely to use this functionality if it's right there in the comment.
Done. |
This is a first step towards reenabling UR performance testing CI. This introduces the reusable yml workflow and a way to trigger it manually.
@intel/llvm-gatekeepers please merge. |
was fixed in e4d65e0 |
This is a first step towards reenabling UR performance testing CI. This introduces the reusable yml workflow and a way to trigger it manually.
Here's an example how it looks:
pbalcer#2 (comment)